The court said the federal government, which had introduced a "rent brake" in 2015 to limit rent increases, was responsible for such decisions.
Property owners and renters were closely watching the ruling.
Shares in property companies with assets in Berlin, including Deutsche Wohnen and Vonovia, rose after the verdict.
Some 6,500 people took to the street in the capital's Kreuzberg neighbourhood to denounce the ruling, a Berlin police spokesman said. The demonstration was largely peaceful and protesters observed distancing rules in place since last year to slow the spread of the coronavirus.
German property group Vonovia welcomed the verdict but said it would waive its right to claim rent arrears.
"The decision of the Constitutional Court is logical and the rent cap was not suitable for solving the problems on Berlin's housing market," said Vonovia Chief Executive Rolf Buch.
Deutsche Wohnen, however, said it would seek reimbursement for the difference between the original and capped rent. Its shares rose 2.8% to the top of German's blue-chip index.
Berlin's city senate is led by Social Democrats in coalition with the Greens and Left party. Berlin is one of Germany's 16 federal states.
"It is now the federal government's task either to create an effective rent law that ensures a social mix in cities or to transfer the competence for this to the states," tweeted Senator Sebastian Scheel, who is responsible for housing.
However, German Economy Minister Peter Altmaier ruled out a national cap, saying it was the wrong approach and the only way to guarantee affordable housing was to build more apartments.
The real estate industry had criticised the rent freeze as unconstitutional. Some experts said it could worsen Germany’s housing crisis by scaring off real estate investors.
Rents in Berlin were for years lower than rents in other major European cities, but they have more than doubled since 2008 as around 40,000 people a year have moved to the German capital. Some 85% of residents rent rather than own homes.