The 29-year-old Irishman is expected to formally sign for the Scottish Premiership club next week on his return from holiday.
Sammon has negotiated an early release from his contract with the English Championship club.
His deal is due to expire on 30 June, but Hearts need to register players for the Europa League 10 days before that.
Sammon, who had a previous spell in Scotland's top flight with Kilmarnock, spent last season on loan to Sheffield United in League One, scoring six times in 33 appearances.
Having switched to Derby for £1.2m from Wigan Athletic in 2012, he was also farmed out to Championship rivals Ipswich Town and Rotherham United after falling out of favour in the last two years and has not been offered a new deal.
Sammon had joined Wigan, then in England's top flight, in 2011 after they had paid Kilmarnock about £600,000 for his services in January 2011.
He had spent two and a half years at Rugby Park after arriving from Derry City and scored 25 goals in 75 games for the Ayrshire outfit.
Sammon, who had also been linked with Aberdeen this summer, has been capped nine times by Republic of Ireland but failed to make their squad for the Euro 2016 finals.
Hearts had signed Abiola Dauda in January to replace Osman Sow, who was sold to Chinese club Henan Jianye, but the Nigerian has returned to Vitesse Arnhem after scoring five times in 15 appearances during his loan spell.
Conor Sammon has agreed a three-year contract with Hearts as the striker prepares to leave Derby County.