Duke brothers Randolph (Ralph Bellamy) and Mortimer (Don Ameche) own Duke & Duke, a successful commodities brokerage in Philadelphia. Holding opposing views on the 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, cultured 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 con artist 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 attends a meeting at his gentlemen's club. Moments before the meeting, an operative working for the Dukes, Clarence Beeks (Paul Gleeson), slips some money into Winthorpe's coat pocket. At the meeting, he is exposed as a thief when the cash is found on his person. He is fired from his job, his bank accounts are frozen, he is treated roughly during processing at the police precinct 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 believe the trumped-up charges 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 a prized employee of the Dukes; Valentine has the street-savvy attitude that could make them millions while trading stocks on the market.
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 when he hears that the Dukes plan to let Winthorpe become destitute and that they plan to eject Valentine following a plan they have to use his talents to corner the stock market on a specific trade commodity.
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 that Clarence Beeks is 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 frozen 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 disguises 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 $1 wager on whether they could get rich while making the Dukes poor simultaneously. Valentine collects his prize 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.