Tesla Motors Inc. and Chief Executive Elon Musk have encountered a rough road in June, capped by a regulators’ disclosure late Thursday that the electric car maker’s autopilot feature is linked to a death in Florida.

The fatality has prompted the National Highway Traffic Safety Administration to open a preliminary investigation into the autonomous-driving feature. The development follows a series of issues in June that dented the company’s winning streak with investors and much of the public.

...