Hayes played his club hurling with the famous Blackrock clun and enjoyed much success throughout the first decade of club activity in Cork. Over the course of twelve championship seasons Blackrock qualified for nine county finals, with victory coming on eight occasions. Hayes was a key member of the team for all of these successes, beginning in 1887 when he captured his first county senior championship title. A second county title quickly followed in 1889. Blackrock were unlucky not to capture a five-in-a-row in the 1890s, however, defeat in 1892 broke the chain. In spite of this Cashman added to his medals tally with victories in 1891, 1893, 1894 and 1895. He finished off his career with Blackrock by winning a two-in-a-row in 1897 and 1898.
Hayes first came to prominence on the inter-county scene with Cork as part of the Blackrock selection in 1893. That year he lined out in his first provincial decider with Limerick providing the opposition. Hayes captured a coveted Munster title following a 5-3 to 0-0 trouncing of Limerick.Kilkenny provided the opposition in the subsequent All-Ireland final. Cork won the game on probably the most unsuitable playing field in hurling history. After someone had neglected to get the grass cut at Ashtown, both teams moved to the Phoenix Park were the game took place. A 6-8 to 0-2 victory gave Hayes a second All-Ireland title.
For a second consecutive year Hayes was selected for championship duty with Cork once again. An easy 3-4 to 1-2 defeat of Tipperary in the provincial decider gave him a second consecutive Munster winners' title. For the second time in three years Dublin provided the opposition in the subsequent All-Ireland final. The game turned into an absolute rout as Cork won easily by 5-20 to 2-0. It was Hayes's second All-Ireland title.