WASHINGTON — President Obama and his family plan to move to a mansion in the upscale Kalorama neighborhood of Washington, a mere two miles from the White House, when he leaves office in January, according to people familiar with his plans.

Mr. Obama, who has said his family will remain in the capital until his daughter Sasha completes high school in 2018, will rent the 8,200-square-foot, nine-bedroom home, the people said, speaking on the condition of anonymity because they were not authorized to reveal his plans.

The house — valued around $6 million, according to several real estate websites, with an estimated monthly rent of $22,000 on Zillow — is owned by Joe Lockhart, a former press secretary and senior adviser to Bill Clinton. Mr. Lockhart was until this year the managing director of a communications and political consulting practice he founded, the Glover Park Group, but has moved to Manhattan to become executive vice president for communications for the National Football League.

Mr. Lockhart and his wife, Giovanna Gray Lockhart, an editor at Glamour magazine, would not comment on the matter, referring queries to the White House. Jennifer Friedman, the deputy White House press secretary, also declined to comment on the president’s plans, first reported on Wednesday by Politico.