No terms were disclosed.
The 36-year-old guard/forward has been out of basketball since knee problems limited him to just four games with the New York Knicks in the 2005-06 season.
"Penny is a player who has been an all-star and had an illustrious career," Coach Pat Riley said on Miami's Web site. "He is a skilled player who can help us at multiple positions (and) we have been impressed with his hard work and dedication this summer."
In 13 NBA seasons with New York, Orlando and Phoenix, the 6-foot-7 inch Hardaway -- a four-time all-star starter -- averaged 15.4 points, 4.5 rebounds and 5.1 assists while playing in 688 games.
Celebrity Couples of 2014 [PHOTOS]