Robyn Denholm, who has led the electric car company’s board for more than five years, has been criticized for not serving as a check on Mr. Musk.
The company’s board of directors will now decide whether to appeal the decision, change where Tesla is incorporated or negotiate a new pay package.
Shareholders had sued, arguing that Mr. Musk’s compensation — which helped make him the world’s richest person — was excessive.
Investors blame Elon Musk and wonder how much more the stock will fall.
Corporate governance experts say the electric-car maker’s directors may need to rein in the chief executive, with whom many have personal ties.
A shareholder is asking the court to void a 2018 compensation package that has paid the chief executive nearly $50 billion.