Obama hails de Blasio's vision of "progressive change." The campaign theme is similar to the president's when he was elected in 2008.
Obama is the latest national Democrat to endorse de Blasio after he became the party's nominee.
In the past week, the public advocate was backed by former President Bill Clinton, ex-Secretary of State Hillary Rodham Clinton and both of New York's senators.
In 2009, Obama waited until mid-October to endorse Bill Thompson.
That elicited criticism from some Democrats who felt the president should have done more to help Thompson. He lost to Mayor Michael Bloomberg that November.
De Blasio will face Republican nominee Joe Lhota and independents in the Nov. 5 election.