Stewart was born in Milton, Dunbartonshire, Scotland. His family were Austin, and later Jaguar, car dealers and had built up a successful business. Racing was established in the household; his father had been an amateur motorcycle racer, and his brother Jimmy was a racing driver who drove for Ecurie Ecosse and competed in the 1953 British Grand Prix at Silverstone.
Stewart attended Hartfield primary school and moved to Dumbarton Academy at age 12. He experienced learning difficulties due to undiagnosed dyslexia and was regularly humiliated by teachers and peers for being "dumb" or "thick." He was unable to continue secondary education past age 16 and began working in his father's garage as an apprentice mechanic. He was not diagnosed with dyslexia until 1980, when he was 41 years old. Before his racing career, Stewart was a prize-winning member of the Scottish shooting team. He won British, Irish, Welsh, and Scottish skeet shooting championships and twice won the "Coupe de Nations" European championship. He finished third in the trials for the British trap shooting team for the 1960 Summer Olympics.
Stewart's competitive driving began in 1961 when Barry Filer, a customer of the family business, provided him with a Marcos in which he scored four wins. In 1962, he tested a Jaguar E-type at Oulton Park, matching Roy Salvadori's times from the previous year. This led to an offer from David Murray of Ecurie Ecosse to drive a Tojeiro EE Mk2 and a Cooper T49, in which he won at Goodwood.
In 1964, Ken Tyrrell recruited Stewart for his Formula Junior team after a test at Goodwood where Stewart bettered the times of Bruce McLaren. Driving for Tyrrell in Formula Three that year, Stewart won his debut at Snetterton by 44 seconds and became the F3 champion. Although he declined early offers to enter Formula One with Cooper and Lotus to gain more experience, he impressed Colin Chapman and Jim Clark during a trial in an F1 Lotus 33-Climax.
Stewart entered Formula One in 1965 with BRM, partnering Graham Hill on a contract worth £4,000. He finished sixth in his World Championship debut in South Africa and won his first World Championship race at Monza later that year. He finished his rookie season third in the championship. In 1966, he won the Monaco Grand Prix, but the season was difficult due to the unreliability of the 3-litre H16 BRMs and a major accident at the Belgian Grand Prix.
For 1968, Stewart switched to Tyrrell's Matra International team, driving a Matra MS10-Cosworth. Despite missing races at Jarama and Monaco due to an injury, he won at Zandvoort and the Nürburgring, where he finished four minutes ahead of the field in rain and fog. He finished the season as runner-up to Graham Hill. In 1969, driving the Matra MS80-Cosworth, Stewart became world champion. That year, he led at least one lap of every World Championship Grand Prix, a feat he is the only driver to have achieved.
In 1970, Tyrrell decided to build his own car after Matra insisted on using their own V12 engines. Stewart won the 1971 World Championship using the Tyrrell 003-Cosworth, winning six races despite having mononucleosis. After finishing second in the 1972 standings to Emerson Fittipaldi, Stewart returned to win his third and final title in 1973. His 27th and final victory occurred at the Nürburgring. At the Italian Grand Prix that year, he drove from 20th place to 4th to secure the championship.
The most significant event of Stewart's career was his 1966 crash at Spa-Francorchamps. Driving at 165 mph in heavy rain, he crashed into a telephone pole and a shed, coming to rest in a farmer's outbuilding with his leg pinned by the steering column while fuel emptied into the cockpit. He was rescued by fellow drivers Graham Hill and Bob Bondurant. The lack of track crews, the absence of medical facilities at the circuit, and an ambulance driver getting lost on the way to a hospital in Liège prompted Stewart to become an outspoken advocate for racing safety.
Stewart campaigned for improved medical facilities, better track barriers, and the mandatory use of seat belts and full-face helmets. He organized driver boycotts of races at Spa-Francorchamps in 1969, the Nürburgring in 1970, and Zandvoort in 1972 until improvements like run-off areas and fire crews were implemented. Stewart noted that while some believed these efforts detracted from the sport, he felt they were necessary, stating he might have been dead otherwise.
Stewart had decided to retire during the 1973 season, noting he was depressed by the pace of his life and the fact that 57 of his friends and colleagues had died during his career. His retirement was moved forward by one race following the fatal crash of his teammate François Cevert during practice for the 1973 United States Grand Prix at Watkins Glen. Stewart retired one race earlier than intended, missing what would have been his 100th Grand Prix.
Outside of Formula One, Stewart nearly won the 1966 Indianapolis 500 on his first attempt, leading by over a lap until a broken scavenge pump ended his race with eight laps to go; he was still named Rookie of the Year. He competed in the Can-Am series in 1970 and 1971, finishing third in the 1971 championship. He also raced in the European Touring Car Championship in a Ford Capri RS2600 and drove the Rover turbine car at the 24 Hours of Le Mans in 1965.
Following his retirement, Stewart was an ABC network television sports commentator for auto racing, covering the Indianapolis 500 for over a decade, and several summer Olympics. He was noted for his rapid delivery and his inability to use an autocue due to his dyslexia. From 1997 to 1999, he served as team principal of Stewart Grand Prix in partnership with his son, Paul. The team achieved a win at the 1999 European Grand Prix with Johnny Herbert before being bought by Ford.
Stewart's record of 27 wins stood for 14 years until Alain Prost surpassed it in 1987. He was the only British driver with three championships until Lewis Hamilton equalled him in 2015. Following the death of John Surtees in 2017, Stewart became the last surviving Formula One World Champion from the 1960s.
Stewart was created an Officer of the Order of the British Empire (OBE) in 1971 and received a knighthood in 2001 for services to motor racing. He received Sports Illustrated's 1973 "Sportsman of the Year" award and the BBC's "Sports Personality of the Year" in the same year. He has been awarded honorary doctorates from Heriot-Watt University, Cranfield University, and the University of St Andrews. In 2010, he was named a founding member of Motor Sport magazine's Hall of Fame. In 2018, he established the charity Race Against Dementia after his wife, Helen, was diagnosed with the condition.