Ryan Stevenson scored for Locke's side after 62 minutes but a stunning strike from teenage substitute Craig Moore and Shaun Hutchinson's header condemned them to defeat.
The Edinburgh side are now 13 points adrift at the bottom of the table after St Mirren and Kilmarnock both won and Locke was left feeling frustrated.
"It's a hard one to take. I seem to be saying the same things every week," he said.
"I certainly felt we played well enough, playing against a really good side and we more than matched them for 90 minutes.
"We went a goal ahead and at that stage I thought we were playing well, passing the ball well and getting the ball forward well. We looked really dangerous on the counter-attack.
"There is nothing you can do about the first goal, it's probably the best substitution Macca (Motherwell manager Stuart McCall) will make all season, the boy comes on and first kick of the ball, 30 yards, top corner.
"But I'm disappointed with the second one, we have got to defend corners better than that."
In contrast, McCall was understandably more upbeat and he was keen to praise 19-year-old Moore, who was on Hearts' books as a youngster, as he showed his former club what they had missed out on.
"I think it was a bit of a surprise to the bench that we threw wee Moorey on ahead of him but he can cut in off the left and he has a terrific shot with his right foot," he said.
"He deserved his chance because he went on loan (at Cowdenbeath) last season and scored seven goals and he has done really well this season.
"He has had to bide his time because John Sutton and Henri Anier have formed a great partnership and Bob McHugh has done well when asked. Wee Moorey is knocking on the door to be involved.
"He has a fantastic appetite for the game and a great attitude, and I was so pleased for him that his first touch in league football ended up in the net."