The film opens in the final race of the 2006 Piston Cup stock car racing season and championship in the Motor Speedway of the South, where a skilled but arrogant rookie racecar, Lightning McQueen (whom Yogi Bear, Cindy, Boo Boo and their friends Snagglepuss, Huckleberry Hound, Quick Draw McGraw, Baba Looey, Augie Doggie and Doggie Daddy, Wally Gator, Magilla Gorilla, Peter Potamus, So-so, Top Cat, his gang (Benny the Ball, Choo-Choo, Spook, Brain and Fancy-Fancy), Squiddly Diddly, Atom Ant, Yakky Doodle, Super Snooper, Blabber Mouse, Lippy the Lion, Hardy Har Har, Touche Turtle, Dum-Dum, Ricochet Rabbit, Droop-a-Long, Pixie, Dixie, Mr. Jinks, Hokey Wolf, Ding-a-Ling and the Hillbilly Bears are hanging out with and they are his helpers in his pit stop), has overtaken his opponents, past a huge wreck, and has built up a huge lead over the cup's defending (but soon retiring) seven-time champion, Strip "The King" Weathers, and perennial runner-up Chick Hicks. However, because of his refusal to make regular pit stops and get new tires, his rear worn tires burst into flames on the final lap, causing him to skid and ultimately crawl to the finish line, barely managing to tie the King and Chick Hicks in a photo finish. Race officials announce that because the three racers are also tied in overall season points they will compete in one final tiebreaker race to be held at the Los Angeles International Speedway in one week to determine the champion.
Late that night, while traveling down Interstate 40 to California, McQueen, Yogi and the others become separated from Mack, his transport truck, and while trying to catch up becomes lost on U.S. Route 66, catching the attention of the local Radiator Springs Sheriff in the process. A chase ensues, during which McQueen crashes and gets tangled in wires, damaging part of the town's main street in the process.
The next morning, McQueen and all our heroes are taken to traffic court, where the town's attorney, Sally Carrera, pleads against McQueen. He is sentenced to repave the road using "Bessie", an asphalt-laying machine. Yogi and the others said that they have done nothing bad at all that they did the night before, so they are told in stay remained in the town and hang out until McQueen is finished with the road and they all must not help him at all. Only interested in leaving and extremely furious, he makes an escape attempt before being hooked up, only to figure out his gas tank was siphoned. McQueen rushes through his first day of paving and the new road surface is so bumpy, unusable, uneven, and poor that he is told he must scrape it off and start over again.
When Doc Hudson offers McQueen a deal -- beat Doc in a race around Willy's Butte and he, Yogi and the others are free to go -- McQueen eagerly accepts. He leaves Doc in the dust at the starting line, but loses control on the loose dirt turn and crashes into a cactus patch. While the town's tow truck, Mater, hauls McQueen out of the cactus patch in which he landed, Doc effortlessly cruises to the finish line after informing McQueen that he races like he fixes roads. McQueen is compelled to scrape off the botched pavement and start over again.
As the ensuing days pass, McQueen is disturbed by nightmares of Chick Hicks winning the Piston Cup and landing Dinoco. He, Yogi and the others start to befriend the town's residents and learn more about the town in the process: how Radiator Springs was once a thriving town until completion of the nearby interstate bypassed the little town, depriving it of its business traffic and visitors (and ironically, depriving those passing visitors of the natural beauty found in the scenery along the old highway); how Sally left behind her rich but unhappy life as an urban lawyer; what "tractor tipping" (a parody of cow tipping) is; and how Doc Hudson was once a famous racecar himself (the "Hudson Hornet") -- and 3-time Piston Cup champion -- until a horrible crash in 1954 ended his racing career. Doc bitterly refuses to reveal much about his past (despite McQueen, Yogi and the others witnessing him expertly drifting through the loose dirt of Willy's Butte where McQueen crashed), labeling his old trophies as "a bunch of empty cups". Even Sally offers McQueen, Yogi and the others a room at the Cozy Cone for all of them to sleep in as an alternative to staying in the impound lot as the week progresses. Even during everyone's time in the town, McQueen realizes that Yogi and the others really are his very, very first and very true, true friends that he ever have; he said that to them when he apologizes to them all for being selfish, arrogant and self-centered and for not caring about them more. Danny and the others forgive him and say that they are sorry for dismissing him as a not-a-good-friend and McQueen forgives them and they all gather for a group hug.
By the time McQueen finishes repaving Radiator Springs's main road, he has formed a bond with the town and its residents. He even formed a huge bond with Yogi and the others. Rather than immediately leaving for California (as he had initially been eager to do), he and all our heroes spend the day touring the town's businesses, receiving a fresh coat of paint and new tires in the process, and Yogi and the others got some Radiator Springs souvenirs as well, and participates in a cruise party that night. But he is suddenly found, then whisked away in his truck, Mack, without even a chance to bid farewell to Radiator Springs and our heroes. The town's residents, Yogi and the others are sad to see him leave, and our heroes and Sally are angry to learn that it was Doc who ultimately informed the media of McQueen's whereabouts.
The final race among McQueen, The King, and Chick opens with what the race's commentators call the "biggest race in history." McQueen is distracted by his memories of Radiator Springs and Yogi and the others, losing time to The King and Chick Hicks, and begins to fear he will simply lose. To his surprise, Doc Hudson has arrived at the race, with Mater and a few others from Radiator Springs who will serve as his pit crew and Danny and the others are also there to help in the pit, as well; Doc, once again wearing his original "Hudson Hornet" racing stripes, takes over as McQueen's crew chief. With Doc's coaching, a record-fast pit stop for new tires, and a few tricks learned from the small town's inhabitants, McQueen is not only able to overtake his opponents, but has built a considerable lead by the final lap.
As McQueen approaches the finish line, Chick sideswipes The King in a desperate attempt to avoid finishing behind him yet again, sending The King into a terrible rollover crash. McQueen, fearing that The King's racing career will end in the same way as did the Hudson Hornet's, comes to a full stop right before the finish line. After Chick gleefully crosses the finish line, McQueen then backtracks to push the veteran racer across the finish line ahead of him, saying that "I think The King should finish his last race". Although Chick Hicks has officially won the Piston Cup, he begins to learn that it's a hollow victory as he is jeered and despised for taking out The King, while McQueen is cheered as a hero for his good sportsmanship. All our heroes congratulate him, and McQueen meets Yogi and the others in a group hug. Tex from Dinoco, The King's sponsor company, offers to support McQueen as his new sponsor; but McQueen, having now had a change of heart, respectfully declines, saying that his current sponsor Rust-eze gave him his "big break," and he wanted to continue with them and also, he wants to stay with his new friends, Yogi and the others forever.
Two days after the race, McQueen returns to Radiator Springs, announcing that he will establish his racing headquarters there. This helps to revitalize the town and draw back visitors and tourists, with the once-abandoned Route 66 being reclassified as "Historic Route 66."