Hastings served as a judge on the United States District Court for the Southern District of Florida until his impeachment and removal due to Hastings being involved in bribery-related actions. He was nominated to the court by President Jimmy Carter in 1979.