Bloomberg, who had said neither Obama nor Republican nominee Mitt Romney had done an adequate job of speaking about critical issues, said in an op-ed article for the online Bloomberg View the president's handling of superstorm Sandy caused him to reconsider his decision not to endorse.
A political independent, Bloomberg said he decided during the past few days that Obama was the better candidate on climate change, The New York Times reported.
"The devastation that Hurricane Sandy brought to New York City and much of the Northeast -- in lost lives, lost homes and lost business -- brought the stakes of next Tuesday's presidential election into sharp relief," Bloomberg wrote.
"Our climate is changing," he said. "And while the increase in extreme weather we have experienced in New York City and around the world may or may not be the result of it, the risk that it may be -- given the devastation it is wreaking -- should be enough to compel all elected leaders to take immediate action."
Bloomberg credited Obama for promoting regulations intended to cut auto and power plant emissions, and said he preferred the president's positions on issues including abortion rights and same-sex relationships.
Obama said in a statement he was "honored" to have the endorsement.
"While we may not agree on every issue," the president said. "Mayor Bloomberg and I agree on the most important issues of our time.
"He has my continued commitment that this country will stand by New York in its time of need," Obama said. "And New Yorkers have my word that we will recover, we will rebuild, and we will come back stronger."
Obama and Romney had sought for months to gain Bloomberg's endorsement but Bloomberg has said he was disappointed with Obama's performance in office and with what he characterized as Romney's changeable views on issues.
"In the past he [Romney] has taken sensible positions on immigration, illegal guns, abortion rights and healthcare -- but he has reversed course on all of them, and is even running against the very healthcare model he signed into law in Massachusetts," Bloomberg wrote.
Despite endorsing the president, Bloomberg criticized Obama for failing to bridge the partisan divide in Washington, saying Obama "devoted little time" to working toward a coalition of centrists on issues including illegal guns, immigration, tax reform and deficit reduction.