Predators general manager David Poile announced the deal Monday.
Ekholm, 25, is a restricted free agent who already has a goal and two assists in seven games this season. The 6-foot-4, 215-pound defenseman currently has 30 points and 66 penalty minutes in 152 career games. He doubled his rookie production last season with 18 points and had a plus-12 rating.
The 102nd draft choice overall in 2009, Ekholm made his postseason debut last spring. He played in all six games against Chicago and tied for the team lead with a plus-4 rating while averaging 26 minutes, 24 seconds of ice time.
The deal averages $3.75 million per year for Nashville.