The ruling is a blow to activists aiming to limit the influence of special-interest groups.
The court voted 5-4 to overturn a 20-year-old rule preventing corporations bankrolling campaign ads from their general budgets.
It threatens similar limits imposed in 24 states and also opens the door for unions to pay for campaign ads. However, direct contributions from corporations and unions to candidates' funds remain illegal.
Critics of the old limits had argued they were an unconstitutional restraint on free speech, and the court majority agreed. Justice Anthony Kennedy said: "The censorship we now confront is vast in its reach,"
Dissenting, Justice John Paul Stevens said: "The ruling threatens to undermine the integrity of elected institutions."
Justices Ruth Bader Ginsburg, Stephen Breyer and Sonia Sotomayor joined Justice Stevens's dissent, parts of which he read out in court.
The court also overruled part of the landmark McCain-Feingold campaign finance bill that barred "issue" ads paid for by unions and corporations in the closing days of election campaigns.
Advocates of strong regulations have predicted that a court ruling against the limits would lead to a flood of corporate and union money in campaigns as early as November's Congress elections.
The decision removes limits on independent expenditures that are not co-ordinated with candidates' campaigns.