Mr Musk’s firm, Tesla, has set up solar panels and energy storage batteries at Hospital del Nino, a children’s hospital in San Juan.
The batteries will provide energy from the panels when sunlight is scarce.
Tesla said on Twitter this was the “first of many” such projects going live.
Mr Musk has also donated $250,000 (£190,000) of his own money to support humanitarian efforts in Puerto Rico, where many people are still without electricity.
Earlier this month, Tesla’s co-founder offered – via Twitter – to help rebuild energy infrastructure.
The US territory’s governor, Ricardo Rossello, responded: “Let’s talk.”
Mr Rossello has since thanked Tesla for its work at the hospital – also on Twitter (in Spanish).
A $300m contract to repair the power grid was recently awarded to a small, two-year-old US firm with just two employees.
Following criticism from US lawmakers, Mr Rossello defended the deal this week.
He said the company, Whitefish Energy Holdings, was the only one that met Puerto Rico’s requirements at a low enough cost.
Tesla is known for its electric cars, such as the Model S, but the company is expanding into the renewable energy sector.
It is installing a 100 megawatt set of its Powerpack batteries in Australia – the largest lithium ion battery storage project in the world.
And last week, it won a $160m contract with wind turbine maker Vestas to place batteries at a new wind farm, also in Australia.
The wind farm will feature solar panels as well as wind turbines and has been designed to provide power for more than 35,000 homes.