Served on board the U.S.S. Kearsarge when she destroyed the Alabama off Cherbourg, France, 19 June 1864. Acting as second captain of the No. 2 gun during this bitter engagement, Hayes exhibited marked coolness and good conduct and was highly recommended for his gallantry under fire by the divisional officer.