When the chief of staff to the WeWork co-founder Adam Neumann became pregnant in March 2016, she was reluctant to share the news with her boss right away.

But ultimately, the employee, Medina Bardhi , felt she had no choice. She had to explain that she could no longer accompany Mr. Neumann on business trips “due to his penchant for bringing marijuana on chartered flights and smoking it throughout the flight while in an enclosed cabin,” according to a complaint she filed with the Equal Employment Opportunity Commission in New York on Thursday.

What followed, the complaint said, was a pattern of discrimination, as Ms. Bardhi was repeatedly derided and marginalized by Mr. Neumann and other WeWork officials. Mr. Neumann referred to her maternity leave as a “vacation” or “retirement,” according to the complaint, and another high-level company official, Jennifer Berrent , commented, “Wow, you’re getting big,” in front of a WeWork executive.

Mr. Neumann, who had promised to champion women at WeWork, stepped down as the company’s chief executive in September as its attempted initial public offering collapsed in dramatic fashion. As part of a deal to turn over control of WeWork to its largest outside investor, SoftBank, he received $185 million to work as a consultant to the company for four years.