Duke brothers Randolph (Ralph Bellamy) and Mortimer (Don Ameche) own Duke & Duke, a successful commodities brokerage in Philadelphia. Holding opposing views on nature versus nurture issue, they make a wager and agree to conduct an experiment switching the lives of two 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 (Dan Aykroyd), engaged to the Dukes' niece Penelope (Kristin Holby) and a poor African-American street hustler named Billy Ray Valentine (Eddie Murphy). Valentine is first seen as a dirt-poor faker who pretends to be blind and paralyzed from the waist down, rolling around the streets of Philly begging for money, when he has a run-in with Winthorpe outside his office building after being chased out of Fairmont Park by two policemen, who order him to stop panhandling. Valentine gets arrested at the racist Winthorpe's insistence because of a suspected robbery attempt. The Dukes decide to use the two men for their experiment.
The next day, Winthorpe is publicly framed as a thief and drugs are planted on him when he's arrested. He is fired from his job, his bank accounts are frozen and he is denied entry to the Duke owned townhome where he resides. He befriends a prostitute named Ophelia (Jamie Lee Curtis) who allows him to stay at her apartment insisting on a reward once he's reestablished in society. Winthorpe soon finds himself ostracized and abandoned by Penelope and his former friends who belive the trumped up charge against him. Meanwhile, claiming to operate an assistance program for the underprivileged, the Dukes bail Valentine out of jail, install him in Winthorpe's position at the company and give him use of Winthorpe's home. Valentine quickly becomes well versed in the business and acts well mannered.
During the firm's annual Christmas party, Winthorpe is caught planting drugs in Valentine's desk as he mistakenly suspects that it was Valentine who framed him. After Winthorpe flees, Valentine hides in a men's room stall to smoke a joint that he took from the drugs that he was tossing into the garbage can. The Dukes enter the washroom and, unaware of his presence, discuss in detail the outcome of their experiment and settle their wager for $1. Valentine overhears this exchange and seeks out Winthorpe.
Winthorpe attempts suicide by overdosing on pills. Valentine, Ophelia and Winthorpe's former butler Coleman (Denholm Elliott) nurse him back to health and inform him of the Dukes' experiment. On television, they learn of a businessman named Clarence Beeks (Paul Gleason) transporting a secret report on orange crop forecasts. Winthorpe and Valentine recall large payments made to Beeks by Duke & Duke and they realize that the Dukes are planning to obtain this report to corner the market on orange juice. The group agrees to disrupt their plan as revenge.
Learning of Beeks' travel plans, the four get aboard his train to switch the report in Beeks' possession with a forgery. Winthrope, Valentine, Ophelia and Coleman are all wearing bizarre and hilarious disguses to try to swipe his briefcase as a New Year's Eve costume party is being thrown on the train. Beeks wises up and uncovers their scheme. In chasing them, he attempts to eliminate them. He fails, is subdued, and the group dress him in a gorilla costume and lock him in a cage with a real gorilla. The forgery is then successfully delivered to the Dukes.
Winthrope and Valentine travel to New York's Wall Street and to the commodities trading floor to execute their plan. Winthorpe and Valentine are able to turn an enormous profit while the Dukes, misled by the false report, commit all their holdings to the venture and incur a loss of $394 million of profit margin. The Dukes confront Valentine and Winthorpe who mockingly explain that they made a wager on whether they could get rich while making the Dukes poor simultaneously. Valentine collects $1 from Winthorpe while Randolph collapses holding his chest from a heart attack. Mortimer protests over the loss of all their money as well as their personal holdings (very likely their property, including their house), as well as their seats on the Exchange, are taken from them.
Meanwhile, Beeks and the gorilla are loaded onto a ship headed to Africa while Valentine, Winthorpe, Ophelia, and Coleman enjoy a luxurious tropical vacation.