The show featured British celebrities and sportspeople, including David Beckham and Bradley Wiggins, and screen characters Mr Bean and James Bond.
In a speech watched around the world, Games chief Jacques Rogge said: "The Olympic Games are coming home tonight."
Flag-bearer Sir Chris Hoy earlier led out Team GB to cheers and applause.
The group of seven, chosen by British Olympic champions, each lit a single tiny flame on the ground, igniting 205 petals, one for each competing nation or territory.
Long stems then rose towards each other to form a cauldron, signifying unity.
The flame made a dramatic arrival via the Thames on a speedboat carrying Beckham, who handed the torch to Sir Steve Redgrave.
The show, billed as a quirky take on UK life, started with iconic images of London and Britain being beamed to the world, and all four countries of the UK being represented in song.
The field at the stadium in Stratford, east London, was turned into a green meadow, with sheep, horses, chickens, ducks and geese among the cast.
The show took the watching world through "great revolutions in British society", from an agricultural setting through to the Industrial Revolution itself.
Steelworkers began forging material that transformed into golden Olympic rings, which appeared to float into the air to be suspended above the performers.
'Evening Mr Bond'