Inverness’ hopes of booking a Europa League ticket next season took a dent with this setback while the home side stay 12th as fellow strugglers St Mirren and Ross County both won their home games – against Hamilton and Dundee respectively.
Motherwell’s Stephen Pearson, returning from a rib injury, hooked over early on while Scott McDonald – who was looking lively on his second debut following his return to the club from Millwall – had a glorious opening after latching on to a long ball, but fired over from the angle.
Greg Tansey hit a rasping drive from 30 yards that flew just over as Inverness hit back while Marvin Johnson replied with another long-range effort that had Ryan Esson scrambling.
The lively Graeme Shinnie found Greg Tansey at the edge of the box, but he blazed over the bar from 16 yards but the best chance of the half was to fall to Danny Willams, who latched onto Josh Law’s weak headed backpass but George Long came scuttling out to smother at the feet of the Caley Thistle man.
The breakthrough came when Conor Grant swung in a fine cross and Louis Lang (48) powered home a header although Williams almost silenced the celebrations shortly after but his shot from 23 yards clipped the top of the crossbar.
Inverness debutant Edward Ofere (76) was then in perfect position to meet Shinnie’s cross and the Nigerian planted a fine header beyond Long to level the scores.
But the home side were not to be denied as Ainsworth (84) cut in from the right and his low shot took a deflection to leave Esson helpless before nestling in the far corner; Simon Ramsden’s ordering of late on for picking up a second yellow failed to take the gloss off the hosts’ first win of 2015.