The 23-year-old midfielder becomes Craig Levein’s first signing since his return as Hearts manager and could make his debut a week on Saturday against Aberdeen at Murrayfield.
The Tynecastle club made an official approach for Callachan and were given permission to talk terms. Raith were reluctant to lose their skipper, who made 125 senior appearances and scored seven goals since joining the club as a 13-year-old.
However, they will receive an undisclosed transfer fee as part of the deal. Callachan, a childhood Hearts supporter, was eager to further his career by moving from League One to the Ladbrokes Premiership.