As a teenager, Hirayama attended Kunimi High School in Nagasaki Prefecture.
There, he won the All Japan High School Soccer Tournament all three years at the school, leading the tournament in scoring in 2002 and 2003.
After graduation in 2004, he enrolled at University of Tsukuba instead of joining a professional club.

In July 2005, Hirayama joined the Eredivisie club Feyenoord on trial and a week later, he joined another Dutch side, the newly promoted Heracles Almelo.
He made his professional debut with Heracles on 20 August 2005 against ADO Den Haag, playing 15 minutes and scoring 2 goals.
He finished the 2005–2006 season with 31 appearances and 8 goals.
Although both Japan's senior side manager Zico and Japan Football Association chairman Saburo Kawabuchi praised Hirayama's progress with Heracles, he was not called up to Japan's squad for the 2006 World Cup.
On 4 September 2006, after the transfer period ended Heracles Almelo announced that Hirayama left the club by mutual consent and after being released he returned to Japan to finish his study.
Only a few days later he signed a contract with FC Tokyo without informing Heracles as a free agent, while he still had a contract until 2008 before his release.
Heracles appealed to this unexpected move by Hirayama.

Hirayama debuted in J1 League on 30 September 2006.
After debut, his opportunity to play increased and he became a regular player from 2009.
At 2009 J.League Cup, he scored a goal at Final and the club won the champions.
However the club was relegated to J2 League end of 2010 season.
In April 2011, he also broke his leg and he could only play one game.
In 2012, the club returned to J1 League, however in May, he broke his leg again and he could hardly play in the match.
From 2013 he played many matches as substitute.
He moved to Vegalta Sendai in 2017.
However he got hurt on the day after the opening game.
He could not play for the injury in this season.
In January 2018, he announced his retirement for many injuries.
As a teenager, Hirayama attended Kunimi High School in Nagasaki Prefecture. There, he won the All Japan High School Soccer Tournament all three years at the school, leading the tournament in scoring in 2002 and 2003. After graduation in 2004, he enrolled at University of Tsukuba instead of joining a professional club.
In July 2005, Hirayama joined the Eredivisie club Feyenoord on trial and a week later, he joined another Dutch side, the newly promoted Heracles Almelo. He made his professional debut with Heracles on 20 August 2005 against ADO Den Haag, playing 15 minutes and scoring 2 goals. He finished the 2005–2006 season with 31 appearances and 8 goals. Although both Japan's senior side manager Zico and Japan Football Association chairman Saburo Kawabuchi praised Hirayama's progress with Heracles, he was not called up to Japan's squad for the 2006 World Cup. On 4 September 2006, after the transfer period ended Heracles Almelo announced that Hirayama left the club by mutual consent and after being released he returned to Japan to finish his study. Only a few days later he signed a contract with FC Tokyo without informing Heracles as a free agent, while he still had a contract until 2008 before his release. Heracles appealed to this unexpected move by Hirayama.
Hirayama debuted in J1 League on 30 September 2006. After debut, his opportunity to play increased and he became a regular player from 2009. At 2009 J.League Cup, he scored a goal at Final and the club won the champions. However the club was relegated to J2 League end of 2010 season. In April 2011, he also broke his leg and he could only play one game. In 2012, the club returned to J1 League, however in May, he broke his leg again and he could hardly play in the match. From 2013 he played many matches as substitute. He moved to Vegalta Sendai in 2017. However he got hurt on the day after the opening game. He could not play for the injury in this season. In January 2018, he announced his retirement for many injuries.
Sōta Hirayama