Rohan Patel, senior global director of public policy and business development, also wrote on X that he was leaving Tesla, after eight years.
Baglino, who held several top engineering jobs at the company and was chief technology officer, wrote that the decision to leave was difficult.
“I loved tackling nearly every problem we solved as a team and feel gratified to have contributed to the mission of accelerating the transition to sustainable energy,” he wrote.
He has no concrete plans beyond spending more time with family and his young children, but wrote that he has difficulty staying still for long.
Musk thanked Baglino in a reply. “Few have contributed as much as you,” he wrote.
Shares of Tesla fell 5 per cent on Monday after news of the layoffs and departures broke. The stock has lost about one-third of its value so far this year as sales of electric vehicles soften.
Tesla sales fell sharply last quarter as competition increased worldwide, electric vehicle sales growth slowed, and price cuts failed to draw more buyers. The company said it delivered 386,810 vehicles from January through March, nearly 9 per cent below the 423,000 it sold in the same quarter of last year.
Since last year, Tesla has cut prices as much as US$20,000 on some models as it faced increasing competition and slowing demand. The price cuts caused used electric vehicle values to drop and clipped Tesla’s profit margins.
The company has said it will reveal an autonomous robotaxi at an event in August.