"Hero" was assigned to the 2nd Destroyer Flotilla of the Mediterranean Fleet upon commissioning. She patrolled Spanish waters during the Spanish Civil War enforcing the policies of the Non-Intervention Committee. "Hero" received a refit in June–July 1939 in the UK and rejoined the Mediterranean Fleet upon its completion. The ship remained in the Mediterranean until 5 October when she was transferred to Freetown, Sierra Leone to search for German commerce raiders. "Hero" returned to the UK in January 1940 and received a refit at Portsmouth from 15 February to 16 March. In the meantime, the 2nd Destroyer Flotilla had been assigned to Home Fleet and the ship rejoined them when her refit was finished.