Cani scored from the halfway line to put Villarreal 2-1 ahead in the 50th minute, just moments after Osasuna forward Krisztian Vadocz had cancelled out Marco Ruben's 22nd-minute opener for the hosts.
Villarreal then extended their lead in the 65th minute through Joan Capdevila, and although Osasuna pulled a goal back soon after through substitute Javier Calleja, the Yellow Submarine ensured the points at El Madrigal when captain Gonzalo Rodriguez headed in their fourth late on.
The victory means Villarreal have now taken 28 points from a possible 30 at home this season and are certain to finish the first half of the La Liga season in third spot.
Osasuna, however, remain in the bottom six after another disappointing away day.
The Pamplona outfit had recorded only two points and scored four goals on their travels heading into today's game, and it was no surprise to see Villarreal take the lead after 22 minutes when Ruben headed in Borja Valero's cross.
Osasuna stunned their hosts though by equalising just after half-time when Vadocz glanced in Fernando Soriano's inswinging corner at the near post.
That was just Osasuna's 16th goal of the season - only Racing Santander had scored fewer - but their joy lasted just three minutes before Cani scored his wonder goal to put Villarreal back in front.
Cani, who was red-carded whilst on the bench against Madrid for throwing a water bottle in the direction of Jose Mourinho but then saw it reduced to a yellow card on appeal, launched a first-time shot from midfield that sailed over stranded Osasuna goalkeeper Ricardo Lopez and into the net.
Villarreal increased their advantage in the 65th minute when Spain full-back Capdevila nodded in from virtually on the line after Ruben had headed Valero's corner goalward.
Osasuna refused to give up and they reduced the deficit to 3-2 when Calleja fired in at the far post following good work by Javier Camunas.
Unfortunately for the visitors they could not find an equaliser and then conceded a fourth goal in an almost identical fashion to Villarreal's third, this time Gonzalo glancing in a header from Valero's corner.