The 27-year-old was released by Hearts at the end of the season, following the club's relegation to the Championship.
Hamill moved to Tynecastle in 2011, four years after making his debut for Kilmarnock.
He has returned to Rugby Park on a three-year contract and will bring some experience to Allan Johnston's team.
A statement from Kilmarnock read: "Everyone at Kilmarnock Football Club would like to wish Jamie every success during his second spell at the club."
Hamill made more than 100 appearances for Kilmarnock during his first spell and he returns to Ayrshire having won a Scottish Cup medal with Hearts in 2012.