In 2004, Michael Townley, Trevor Philips, and Brad Snider partake in a botched robbery in Ludendorff, North Yankton, resulting in all three being presumed dead. Nine years later, Michael is living under witness protection with his family in the city of Los Santos, under the alias Michael De Santa. Across town, gangbanger Franklin Clinton is working for a corrupt Armenian car salesman and meets Michael while attempting to fraudulently repossess his son’s car; the two later become friends. When Michael finds his wife Amanda sleeping with her tennis coach, he and Franklin chase the coach to a mansion, which Michael partially destroys in anger. The owner of the mansion turns out to be the girlfriend of Martin Madrazo, a Mexican drug lord who demands compensation to avoid further violence. Michael returns to a life of crime to obtain the money, enlisting Franklin as an accomplice. With the help of Michael’s old friend Lester Crest, a disabled hacker, they perform a jewelry store heist to pay off the debt. Meanwhile, Trevor, who now lives in a trailer park on the outskirts of Los Santos, hears of the heist and realizes that it was Michael’s work; Trevor had believed that Michael was killed in their botched robbery nine years ago. Trevor tracks Michael down and reunites with him, forcing a reluctant Michael to accept him back into his life.
As time goes on, the personal lives of the protagonists begin to spiral out of control. Michael’s increasingly disreputable behavior prompts his family to leave him. When he becomes a movie producer at the film studio, Richards Majestic, Michael comes into conflict with Devin Weston, a self-made billionaire venture capitalist, and corporate raider, who vows revenge after his attempts to shut down the studio are thwarted by Michael. Meanwhile, Franklin rescues his friend Lamar Davis from a rival gangster and former friend Harold “Stretch” Joseph, who repeatedly attempts to kill Lamar to prove himself to his new brethren. At the same time, Trevor’s reckless efforts to consolidate his control over various black markets in Blaine County see him waging war against The Lost outlaw motorcycle club, several Latin American street gangs, rival meth dealers, private security firm Merryweather Security, and Triad kingpin Wei Cheng.
Federal Investigation Bureau (FIB) agents Dave Norton and Steve Haines contact Michael and demand that he, Franklin, and Trevor perform a series of operations to undermine a rival agency, the International Affairs Agency (IAA). Under Steve’s direction and with Lester’s help, they attack an armored convoy carrying funds intended for the IAA and steal an experimental chemical weapon from an IAA-controlled lab. As Steve comes under increasing scrutiny, he forces Michael and Franklin to erase any evidence being used against him from the FIB servers. Michael takes the opportunity to wipe the data on his activities, destroying Steve’s leverage over him.
Eventually, Michael, Trevor, Franklin, and Lester start planning their most significant heist ever: raiding the Union Depository’s gold bullion reserve. By this time, Michael reconciles with his family. However, Trevor discovers that Brad was not imprisoned as led to believe, but killed during the Ludendorff heist and buried in the grave marked for Michael. Trevor’s feelings of betrayal cause friction within the group and threaten to undermine their Union Depository plans. Steve betrays Michael and Dave, and they become caught in a Mexican standoff between the FIB, IAA, and Merryweather. Trevor, feeling that he is the only one who has the right to kill Michael, comes to their aid. Despite not forgiving Michael, Trevor agrees to perform the Union Depository heist and part ways with him afterward.
The heist is successful, but Franklin is then approached separately by Steve and Dave, who contend that Trevor is a liability, and Devin, who wants retribution for Michael’s betrayal. Franklin has three choices: kill Trevor, kill Michael, or attempt to save both in a suicide mission. Should Franklin choose to kill either Michael or Trevor, he ceases contact with the man he spares and returns to his old life. Otherwise, the trio withstands an onslaught from the FIB and Merryweather before going on to kill Cheng, Stretch, Steve, and Devin. Michael and Trevor reconcile, and the three protagonists cease working together but remain friends.