Parking is a huge problem in the city and Rome-based start-up MonkeyParking thought it had come up with a solution.
The app lets users auction off public parking spaces that they are using and wait for the buyer to arrive before pulling out.
But the city says it is illegal to auction off public land and has threatened to fine anyone doing so.
San Francisco lawyer Dennis Herrera sent a cease-and-desist order to MonkeyParking and has also asked Apple to remove it from the app store for violating local law.
Private profit
The mobile peer-to-peer app describes itself as the first "which lets you make money every time that you are about to leave your on-street parking spot".
But according to a statement from Mr Herrera it "creates a predatory private market for public parking spaces that San Franciscans will not tolerate".
"We will not abide businesses that hold hostage on-street public parking spots for their own private profit."
He said that the company would be subject to fines of up to $2,500 (£1,470) per violation and it has been given until 11 July to stop operating in the city. Users of the app would also be subject to a $300 fine.
In response, MonkeyParking co-founder Roberto Zanetti said that the firm is talking to its lawyers about the letter.
"As a general principle we believe that a new company providing value to people should be regulated and not banned," he told the BBC.
"This applies also to companies like Airbnb, Uber and Lyft that are continuously facing difficulties while delivering something that makes users happy."
Uber, which offers private car hire via an app, has faced a backlash across Europe with taxi drivers angry that it does not face the same regulation as they do.
Two other parking apps which offer a similar service to MonkeyParking - Sweetch and ParkModo - have been warned they will receive similar letters.
Apps such as CARMAnation that allow people to rent private parking spaces are not affected by the ban.
"People are free to rent out their own private driveways and garage spaces should they choose to do so," said Mr Herrera.
Source: BBC News