SAN FRANCISCO—Employees at Juul Labs Inc. were accustomed to puffing away on the sleek e-cigarettes that made the startup an overnight success. So their boss had to acknowledge some awkwardness on Tuesday when he delivered the message: No vaping in the office.

Juul’s chief told employees across the U.S. that, starting immediately, they could no longer use its products inside at work and that future vaping at San Francisco headquarters must happen outside under a tent to be erected specifically for the purpose.

E-cigarette use has been illegal in California workplaces since June 2016, about a year after the Juul came onto the market.

“It may feel nonsensical to prohibit at-work use of the very products we work hard to create and promote,” Chief Executive Kevin Burns emailed staff. “But the bottom line is we need to comply with legal requirements the same as any company.”

Mr. Burns wrote in his email to employees that Juul had received an inquiry from the city about vaping practices in its offices. He declined to be interviewed.