Brothers Randolph and Mortimer Duke own a successful commodities brokerage firm, Duke & Duke Commodity Brokers, in Philadelphia. Holding opposing views on the issue of nature versus nurture, they make a wager and agree to conduct an experiment—switching the lives of two unwitting people at opposite sides of the social hierarchy and observing the results. They witness an encounter between their managing director—the well-mannered and educated Louis Winthorpe III, engaged to the Dukes’ grand-niece Penelope—and a poor street hustler named Billy Ray Valentine; Valentine is arrested at Winthorpe’s insistence because of a suspected robbery attempt. The Dukes decide to use the two men for their experiment.
Winthorpe is publicly framed as a thief, drug dealer and philanderer by Clarence Beeks, a man on the Dukes’ payroll. Winthorpe is fired from Duke & Duke, his bank accounts are frozen, he is denied entry to his Duke-owned home, and he quickly finds himself vilified by Penelope and his former friends. He befriends Ophelia, a prostitute who agrees to help him in exchange for a financial reward once he is exonerated. Meanwhile, the Dukes bail Valentine out of jail, install him in Winthorpe’s former job and grant him use of Winthorpe’s home. Valentine soon becomes well-versed in the business using his street smarts to achieve success, and begins to act well-mannered.
During the firm’s Christmas party, Winthorpe is caught planting drugs in Valentine’s desk in an attempt to frame him, and he brandishes a gun to escape. Later, the Dukes discuss their experiment and settle their wager for one dollar, before plotting to return Valentine to the streets, but having no intention of taking back Winthorpe. Valentine overhears the conversation and seeks out Winthorpe, who has attempted suicide by overdosing on pills. Valentine, Ophelia, and Winthorpe’s butler, Coleman, nurse him back to health, and inform him of the Dukes’ experiment. From a television news broadcast, they learn that Clarence Beeks is transporting a secret USDA report on orange crop forecasts. Winthorpe and Valentine recall large payments made to Beeks by the Dukes, and realize that the Dukes plan to obtain the report early to corner the market on frozen concentrated orange juice.
On New Year’s Eve, the four board Beeks’ Philadelphia-bound train, intending to switch the original report with a forgery that predicts low orange crop yields. Beeks uncovers their scheme, and attempts to kill them, but he is knocked unconscious by a gorilla being transported on the train. The four disguise Beeks with a gorilla costume, and cage him with the real gorilla. After delivering the forged report to the Dukes in Beeks’ place, Valentine and Winthorpe travel to New York City with Coleman’s and Ophelia’s life savings to carry out their part of the plan.
On the commodities trading floor, the Dukes commit all their holdings to buying frozen concentrated orange juice futures contracts; other traders follow their lead, inflating the price. Meanwhile, Valentine and Winthorpe short sell frozen concentrated orange juice futures contracts heavily at the inflated price. Following the broadcast of the actual crop report and its prediction of a normal harvest, the price of orange juice futures plummets. Valentine and Winthorpe turn around and start buying futures at the lower price from everyone except the Dukes, to fulfill the contracts they had short sold earlier, turning an immense profit. The Dukes fail to meet a margin call, and are left owing $394 million, effectively bankrupting them. Valentine and Winthorpe gleefully explain to the Dukes that they had made a wager on whether they could simultaneously get rich while making the Dukes poor. Valentine collects $1 from Winthorpe while Randolph collapses holding his chest and Mortimer shouts angrily at his brother about their failed plan. Later, the now wealthy Valentine, Winthorpe, Ophelia, and Coleman vacation on a tropical beach, while Beeks and the gorilla are loaded onto a ship heading for Africa.