On May 22, 2014, the White House announced Castro as the nominee to be the next secretary of Housing and Urban Development (HUD) by President Barack Obama. He was confirmed by the Senate on July 9, 2014 by a vote of 71-26 and replaced Shaun Donovan, who was nominated to be the Director of the Office of Management and Budget. He took office on July 28, 2014. Following the announcement, Castro was discussed as a potential nominee for vice president for the Democratic Party in the 2016 presidential election.