HAWTHORNE, Calif.—Tesla Motors Inc. Chief Executive Elon Musk unveiled a line of home and industrial battery packs late Thursday, representing a strategic shift as his money-losing electric car company tries to break into a crowded energy storage market.

More than just a splashy evening party in a hangar at Tesla’s Southern California design studios, the event was the 43-year-old billionaire’s attempt to bring attention to an alternative business unit that has long been under development.

...