The Tykes manager remonstrated with the referee at the interval after Lee Gregory’s penalty in first-half stoppage time cancelled out Tom Bradshaw’s 40th-minute opener.
With Heckingbottom in the stands, Barnsley rallied and on the hour mark Bradshaw found the net again, before replacement Mamadou Thiam wrapped up their first away win of the season with a late penalty.
“I made sure none of the players went up to the referee at half-time,” said Heckingbottom. “The staff’s job was to get them all away from the referee and I just approached him by myself.
“When I came out in the second half to go in the technical area he told me I couldn’t go in there. I didn’t want to make a scene, but I don’t know why I wasn’t allowed to be in there in the second half.
“It was a clean tackle (from Matty Pearson), we could all see it. When I watched it back it is so apparent with the Millwall players’ reactions, but the linesman’s flag went straight up.
“They were given the penalty before the referee could even make a decision. It’s just one of those things.
“I am delighted with the way we handled Millwall. We could control the game with the ball. The only blemish on it is conceding the goal and not keeping a clean sheet.”
Gregory had squandered a golden opportunity in only the third minute, seeing his right-footed shot saved superbly by goalkeeper Adam Davies, while Steve Morison also came close in the first half with a header.
And while substitute Shane Ferguson wasted Millwall’s best chance of the second half when he was left unmarked inside the box, Lions manager Neil Harris admitted the Tykes deserved three points.
He said: “I was disappointed with the performance of course, and disappointed with the outcome result-wise. I take responsibility because I picked the team.
“If I were to take anything away from today, it’s if we’re not at our best Millwall standard in every fixture in the league this season, we can get beat any time - home or away.
“Today we were not at our best as a defensive unit, we were too stretched, we gave away the ball cheaply and we were hurt on the transition.
“Ultimately, if you give any players at this standard the opportunity, they will take them. Barnsley deserved to win.
“I’m disappointed today - but over 11 games so far this season, I am delighted with my group.”