Hamaguchi was born in Nagaoka District, Tosa Province (now part of Kōchi city, Kōchi Prefecture on the island of Shikoku). He was the third son of Minaguchi Tanehira, an official in the local forestry department, and took the Hamaguchi name on his marriage to Hamaguchi Natsuko in 1889. Hamaguchi graduated from the Law College of Tokyo Imperial University in 1895 and began his career as a bureaucrat in the Ministry of Finance. In 1907, he rose to the position of Director of the Monopoly Bureau. He became Vice Communications Minister in 1912 and Vice Finance Minister in 1914.
Hamaguchi joined the Rikken Dōshikai political party led by Katō Takaaki in 1915, which became the Kenseikai in 1916. Hamaguchi was elected to the lower house in the Japanese Diet in 1915 from the Kōchi Second District, and was to hold onto this seat until his death in 1931.
In June 1924, Hamaguchi served as Finance Minister under the first Katō administration, holding the same portfolio under the 1st Wakatsuki administration from January to June 1926. As Finance Minister, he pursued fiscal retrenchment, and proposed reducing government spending by 17 percent and laying off tens of thousands of government workers; however, his policies had to be scaled considerably back due to strenuous opposition from government bureaucrats.
Hamaguchi was subsequently Home Minister in the Wakatsuki cabinet from June 1926 to April 1927. In a continuation of his efforts while as Finance Minister, Hamaguchi promoted a moral campaign through sponsorship of movies which emphasized thrift and reduced public consumption, with the goal of helping reduce Japan's trade deficit.
In 1927, Hamaguchi became the chairman of the new Rikken Minseitō political party formed by the merger of the Kenseikai and the Seiyūhontō.
After the collapse of the administration of Tanaka Giichi in June 1929, Hamaguchi was selected to become Prime Minister of Japan and formed a cabinet based largely on Minseitō party members, which supported domestic economic reforms over overseas military adventurism. With a strong sense of his own rectitude and a tough, stubborn temperament, Hamaguchi inspired trust, promising that he was "ready to die if necessary" for the good of the country during his inaugural speech and promising an administration free of corruption.
Hamaguchi's primary concern was the Japanese economy, which had been in an ever-increasing recession since the end of World War I, and had been greatly weakened by the devastation caused by the 1923 Great Kantō earthquake. Hamaguchi promoted retrenchment, deflation and the rationalization of industry. The 1929 Great Depression, starting soon after he took office, put further pressure on the economy.
Initial public confidence and strong support from Emperor Hirohito and his entourage, including the genrō Saionji Kinmochi allowed Hamaguchi to implement fiscal austerity measures, which included ratification of the London Naval Treaty of 1930, which curtailed military spending. However, his measures to help stimulate exports, such as maintaining the Japanese yen on the gold standard, proved disastrous.
The failure of Hamaguchi's economic policies played into the hands of right-wing elements, already enraged by the government's conciliatory foreign policies and Japan’s increasing unemployment problems. The opposition Rikken Seiyūkai joined forces with the vocal anti-Treaty faction within the Imperial Japanese Navy to accuse Hamaguchi of infringing of the military's "right of supreme command" as guaranteed under the Meiji Constitution.
Hamaguchi's initial popularity quickly waned, and he fell victim to an assassination attempt on 14 November 1930 when he was shot inside Tokyo Station by Tomeo Sagoya, a member of the Aikoku-sha ultranationalist secret society. (Nine years earlier another Prime Minister, Hara Takashi, had been assassinated near the same place.) The head of the Aikoku-sha was Seiyūkai politician Ogawa Heikichi. The wounds kept Hamaguchi hospitalized for several months.
Hamaguchi was reelected to a second term as Prime Minister of Japan in March 1931. However, with his health continuing to deteriorate, he was unable to attend the 59th Session of the Imperial Diet, which opened with Foreign Minister Kijūrō Shidehara as acting Prime Minister. The Seiyūkai immediately attacked the government on the grounds that the Prime Minister was not physically present, and that Shidehara was not even a member of the Minseitō. When Shidehara further created an uproar with a comment concerning Emperor Hirohito's support of the London Naval Treaty, the Seiyūkai refused to participate in budget deliberations until Hamaguchi could attend. Despite his failing health, Hamaguchi was forced to attend the Diet, but resigned a month later to be replaced by Wakatsuki Reijirō. He died on 26 August of the same year, and his grave is at the Aoyama Cemetery in Tokyo.
In 1931 Hamaguchi's cabinet sponsored a bill on women's suffrage. It would have granted women over the age of 25 the right to vote in local elections and stand for office given their husbands' approval. The bill passed the lower house, but it was defeated in the House of Peers in March 1931 by a vote of 184 to 62.Grand Cordon of the Order of the Sacred Treasure (July 1926)
Grand Cordon of the Order of the Rising Sun (April 1927)
Grand Cordon of the Order of the Rising Sun with Paulownia Flowers (April 1931)