The panels are expected to generate 6.3 kilowatts of solar power whenever the sun shines, the White House said.
Obama wants to use his personal example to spur families and businesses to do more to reduce reliance on foreign energy and cut emissions blamed for global warming.
"Solar panels at the White House are a really important message that solar is here, we are doing it, we can do a lot more," Energy Secretary Ernest Moniz said in a video released by the White House.
The project required technicians to first drill down to the concrete on the White House roof, then use epoxy glue and threaded rods to install a gridded subassembly onto which the solar panels could be secured.
The solar components, converters and the labor to install the panels were all domestic, according to the White House, which declined to name any of the companies involved in the project.
"Being at the White House, we do have some security concerns. We can't cover the entire roof, although that would be good from an energy savings standpoint," said James Doherty, the White House usher.
For some climate change activists, the years of delay underscored a lack of urgency. Bill McKibben of the environmental group 350.org said the project was symbolically significant, but also depressingly protracted.
"At this pace, we'll solve global warming right about the time that we're 30 feet under water," McKibben said in an interview.
Obama isn't the first president to deploy solar at the White House.
President Jimmy Carter spent $30,000 on a solar water-heating system for West Wing offices in the late 1970s, but his successor, Ronald Reagan, tossed the panels after he moved in.
President George W. Bush's solar systems powered a maintenance building and some of the mansion, plus provided heated water for the pool.
Reach Josh Lederman at http://twitter.com/joshledermanAP