The Sharks also got a fifth-round pick in the deal announced on Saturday.
The trade on the opening day of training camp ends a dispute that has overshadowed the Senators in recent months.
The 28-year-old Heatley said he wanted out of Ottawa because he wasn't being used properly. But he angered fans when he refused to waive a no-trade clause to go to Edmonton.
The Sharks beef up their offense by acquiring a former 50-goal scorer. Heatley had 39 goals and 33 assists last season.