Family Guy creator Seth MacFarlane's directorial debut earns £9.3 million from its 509 locations to end The Dark Knight Rises's two-week run at the chart summit.
Ted's opening haul is the biggest first-weekend for a comedy movie in 2012. Last year, The Hangover Part II debuted to £10.41 million, while The Inbetweeners Movie scored the biggest ever comedy bow with £13.22 million.
Diary of a Wimpy Kid: Dog Days, the third instalment in the family franchise, takes the number three slot ahead of Ice Age 4 and The Lorax.
Pixar's Brave makes its UK box office debut at number six after opening early in Scottish, Irish and Northern Irish cinemas. It is expected to better its £820,084 gross when it expands into English and Welsh locations on August 13.
Elsewhere, Mirror Mirror re-enters the top ten, rising up to number nine after its location count is boosted to 187 for the school holidays.
The UK box office top ten in full:
1. (-) Ted - £9,333,700
2. (1) The Dark Knight Rises - £4,290,605
3. (-) Diary of a Wimpy Kid: Dog Days - £1,537,178
4. (3) Ice Age 4: Continental Drift - £1,213,388
5. (2) The Lorax - £856,003
6. (-) Brave - £820,084
7. (4) The Amazing Spider-Man - £392,715
8. (5) Magic Mike - £288,189
9. (-) Mirror Mirror - £60,769
10. (7) Searching for Sugar Man - £42,416
Watch the trailer for Ted below: