An error by Ryan Esson enabled John Sutton to put the visitors 1-0 up but Caley were level before half-time through a Grant Munro goal.
Cillian Sheridan, on loan to Motherwell from Celtic, grabbed the winner eight minutes into the second period.
Caley Thistle started positively and appealed for a penalty when Dougie Imrie took a tumble under a Mark Reynolds challenge, but referee Mike McCurry rejected the claims.
Motherwell responded and put the hosts under pressure from a Stevie Hammell corner, with goalkeeper Esson punching the delivery away.
Esson was then called into actionwhen he got down well to hold a low shot from Stephen Hughes from distance.
Hughes should have done better in the 19th minute when he saw space and fired into the side-netting after being put through by Sheridan.
At the other end, goalkeeper Graeme Smith had to be alert to cut out a low cross from Richie Foran.
Well stole into the lead after 25 minutes after a mix-up in what had been a solid Inverness defence since Terry Butcher took over last month.
Esson came out to clear an attack but failed to connect with the ball and that left Sutton with an empty net to aim at from just outside the box.
Seven minutes from the interval Inverness skipper Munro hauled his side level when he pounced to score from close range after Ian Black’s corner broke to Eric Odhiambo and the striker’s shot was charged down. Munro reacted quickest to the loose ball to fire home.
The hosts started the second half on the front foot and Munro’s cross just missed the boot of Foran at the back post.
However, it was the visitors who regained the lead in the 53rd minute when Munro lost his footing on the edge of the box and Sheridan hit a wonderful shot past Esson into the net.
Both sides were looking lively in attack with the pressure certainly more on the Inverness men given their league position.
Imrie forced Smith into a save when his free-kick was gathered low down.
With Caley Thistle getting a grip on the game, substitute Adam Rooney headed just wide from an Imrie cross on 75 minutes.
The Irishman then scooped the ball over the crossbar after it fell to him with speed from a delivery into the area.
A last-minute appeal for a penalty was overlooked when Black’s long ball seemed to strike Stephen Craigan’s hand, and the visitors held on to claim all three points.