On-loan striker Marcus Tudgay pounced in the third minute of injury time to secure an unexpected 2-1 victory against the Lions, who saw Darius Henderson miss a penalty in the first half and Adam Smith sent off in the second.
Stephen Dawson made the most of Henderson's 25th-minute penalty miss, given for a challenge from Scott Wiseman on him, by tapping home from close range to open the scoring for Barnsley moments later.
Millwall equalised through striker Chris Wood 10 minutes from time - less than half an hour after referee Trevor Kettle dismissed Tottenham loanee Smith for a lunge at David Perkins.
But there was a twist to come as Barnsley struck at the death through Tudgay, to frustrate Jackett.
"Looking at the key points in the game we've missed a penalty, the sending off was a harsh one which we will be appealing, and the winning goal looked close to being offside," said Jackett.
"When we went down to 10 men it looked like there was only going to be one winner. Going down to 10 galvanised us and we played better so it's hugely disappointing to lose.
"We were going all out for the win and it showed at the end. The penalty miss wasn't the only turning point in the game but it did have an effect on its outcome.
"I don't think we did enough when we had 11 men to win it. The character we showed when we went down to 10 was admirable, but the red card looked harsh and is baffling to me."