Adam Neumann is giving up control of WeWork after his bid to take the office-rental company public collapsed in a storm of controversy.

The 40-year-old, Israel-born entrepreneur — who has lately been slapped with allegations ranging from self-dealing to smoking pot on a corporate airplane trip — has agreed to step down as chief executive of WeWork’s parent company, We Co.

In a deal that was reportedly brokered at We adviser JPMorgan’s headquarters with the help of the bank’s CEO Jamie Dimon, the company said Tuesday that Neumann will remain as nonexecutive chairman of the board.

The power of Neumann’s voting shares will likewise get slashed to 3-to-1 from 10-to-1. Earlier, his voting power had been as high as 20 shares for each share he held.

We has named two executives to take Neumann’s place: Artie Minson, co-president and chief financial officer, and Sebastian Gunningham, a vice president.

Neumann has been under pressure to surrender the reins of the fast-growing startup by We Co.’s largest shareholder, Japanese investment firm Softbank, which bought shares of We Co. at a $47 billion valuation earlier this year — only to learn that the company would be valued at under $20 billion in an IPO.

We Co. pulled its IPO last week as Neumman has been plagued by stories questioning his management style, including a recent report that a jet owner had to recall a plane Neumann was on after the crew found marijuana shoved in a cereal box on the flight.

A series of bizarre anecdotes has also emerged about Neumann and his wife, Rebekah Paltrow Neumann — cousin of Goop goddess Gwyneth Paltrow, including how Rebekah fired a cluster of employees she’d just met because she “didn’t like their energy.”

Among incidents attributed to Neumann or his wife:

*Trademarking the word “We” and selling it to the own company for $5.9M.

*Banning employees from expensing meals with meat.

* Ordering We Co. maintenance and IT staff to their private homes to fix stuff.

* Hosting booze-fueled parties for staff, including executive retreats with $110 bottles of tequila.

*Selling multiple hundred million dollars of shares that weren’t disclosed in IPO docs.

A financial filing in August revealed that the company would default to Neumann’s wife in the event anything happened to her husband — who also had the power to fire the entire board.

Bizarre behavior and a corporate structure designed to keep power with Neumann and his wife fueled criticisms about the company’s lack of profitability.

For all of 2018, We Co. reported a net loss of $1.9 billion on $1.8 billion in revenue.

Last week, when We Co. pulled its Nasdaq listing until further notice, observers saw it as a setback for SoftBank, which owns nearly 30% of We Co. and had hoped to fatten its coffers from the public offering in time to court investors for its second $108 billion Vision Fund.

Neumann co-founded WeWork with Miguel McKelvey in 2010 and transformed what had been considered a boring business — subleasing office space — into a global enterprise that serves 527,000 members a day in 111 cities and 29 countries.