He graduated from the political science department of Tokyo Imperial University in 1895 and entered the Ministry of Finance.
After serving as chief revenue officer of Yamagata Prefecture, he held various posts as a bureau chief and head of the Monopoly Bureau, and in 1912 became vice-minister of communications under Minister of Communications Goto Shimpei. Later, at the urging of Goto, he joined the political party known as the Rikken Doshikai and became active in party politics. In 1914, after the Siemens bribery scandal had forced the resignation of die Yama-moto cabinet, lie became vice-minister of finance in the second Okuma Shigenobu cabinet, serving under Minister of Finance Wakatsuki Reijiro.
In 1915, while holding this post, he was also elected a member of the Lower House of the Diet from Kochi Prefecture. For a period of some ten years from 1916 on, he represented the Kenseikai (an outgrowth of the Rikken Doshikai) and others, which later became the Rikken Minseito, in its opposition to the Seiyukai of Hara lakashi, and is particularly famous for his controversy with Minister of f inance Takahashi Korekiyo in which he advocated budget reduction. In 1924, when the Kiyoura Keigo cabinet was overthrown and Kato Takaaki formed a new cabinet made up of the three political parties advocating protection of the constitution, Hamaguchi became minister of finance and in 1926 became minister of home affairs in the Wakatsuki Reijiro cabinet. In 1927, when the political party known as the Rikken Minseito was formed, he became its president.
In 1929 he became prime minister and formed his own cabinet.
He was a man of sincere character and grave bearing; known popularly as the “Lion Prime Minister,” he lived a life of strict integrity.