"I just knew it was time," the 38-year-old Hampton said in a statement. "The fire is there and the passion will always be there, but physically it was just time to shut it down."
The oft-injured Hampton was 148-115 with a 4.06 ERA in 419 games, including 355 starts.
He led the National League with 22 wins in 1999 while with Houston. But the two-time All-Star had just 10 wins in the past five seasons.
Hampton had elbow surgery in 2005 and 2007, and rotator cuff surgery in 2009. He signed a minor league contract with Arizona last August.