The 28-year-old has been a free agent since last summer following his exit from Rangers as he looked to fully rehab himself from injury before returning to football.
He will look to help Accies in their fight against relegation. The Lanarkshire club currently sit in last place in the Ladbrokes Premiership, and have lost their last three games in all competitions by a combined score of 14-0.
Templeton spent four years at Ibrox after joining in a reported £700,000 deal from Hearts.
The winger was signed by the Tynecastle club from Stenhousemuir after impressing in the lower leagues as a teenager.
After making his first-team breakthrough in 2009, he would total 95 appearances in a maroon jersey.
He famous scored against Liverpool at Anfield as Hearts narrowly lost out in the Europa League tie.