TOGLIATTI, Russia—Bo Andersson laid off thousands and renegotiated supplier contracts as chief executive of Russia’s largest auto maker, a perennial money-loser for its controlling shareholder, Renault SA of France.

The cost-saving moves angered many in Togliatti, a one-industry city some 500 miles east of Moscow. Discontent trickled up to the highest echelons of Russia’s political elite and prompted a warning shot last spring from an ally of President Vladimir Putin.

“You’re playing with fire,” Sergei Chemezov, the Putin friend, recalls telling Mr. Andersson. Mr. Chemezov runs a state-owned defense and industrial company that holds a minority stake in the auto maker, OAO AvtoVAZ.

Last month, Mr. Andersson, a Swedish-born industry veteran, was pushed out, barely two years after Renault brought him in to handle its multibillion-dollar bet on the Russian car market.

Such are the challenges Western investors face in Russia, where the state-led capitalism of Mr. Putin’s regime often blurs the lines between business and politics, a combination that has confounded a litany of companies that once saw the country as a promising and large new market.