Niwa was born in Kawachinagano on January 16, 1986. He joined J1 League club Gamba Osaka from their youth team in 2004. However he could not play at all in the match. In 2007, he moved to J2 League club Tokushima Vortis on loan. He played 45 matches as defensive midfielder. In 2008, he moved to J1 club Omiya Ardija on loan. However, there were few opportunities to play. In August, he moved to J2 club Avispa Fukuoka on loan. He played as center back and Avispa was promoted to J1 end of the 2010 season. In 2012, he returned to Gamba. However Gamba was relegated to J2 end of the 2012 season. In 2013, he became a regular player as center back and Gamba won the champions and was returned to J1 in a year. In 2014, Gamba won all three major title in Japan; J1 League, J.League Cup and Emperor's Cup. In July 2017, he moved to Sanfrecce Hiroshima. In July 2018, he moved to FC Tokyo.