Match summary
Rampant Hearts surged eight ahead of Celtic at the top of the Scottish Premiership to strengthen their early-season championship claims and worsen the struggles around the Celtic team.
Alexandros Kyziridis' fine strike and a spot-kick from Shankland gave Derek McInnes' side a two-goal advantage that the reigning champions could not overcome.
Dane Murray - one of three youngsters in the Celtic starting lineup - slashed into his own net in the early stages to put the home side ahead at a bouncing Tynecastle, and it was the youngster's infringement that led to the penalty.
A stylish finish from McGregor of the season had quickly cancelled out the first goal, and the Swedish attacker almost put Rodgers' team in front, choosing placement over power and allowing Alexander Schwolow to make a crucial stop.
But Derek McInnes' irrepressible Hearts seized control again to hand the visitors to back-to-back losses for the initial occasion since 2023.
It also gives the Edinburgh side a commanding advantage at the summit.
The last time they were so far clear was in the 2005-2006 season under George Burley, when they ultimately finished second - one of just four occasions that a team has failed to win the title after building such an advantage in the past 27 years.
McInnes, whose former team were runners-up to the champions on four occasions, has been working hard to downplay championship discussions, as the club seek their first top-flight crown since 1960.
The Celtic boss has experienced this previously at the club - both flawless and stuttering starts to a season. He's never ended as runner-up.
But on the weekend's performance, this Edinburgh outfit showed they deserve serious consideration.
Hearts started with the self-assurance of a side unbeaten in the league this season - the popular attacker poked a cross in for Shankland to stab wide.
Celtic didn't help themselves with some uncharacteristic carelessness in possession and they buckled under their first real examination.
Claudio Braga's header was tipped onto the woodwork by the Celtic keeper and Shankland's return ball was diverted goalwards by the unfortunate Murray, in for the injured Cameron Carter-Vickers.
Celtic found their rhythm and started building moves. From a flowing attack, Sebastian Tounekti released the full-back to set up the captain, who rolled in.
Apart from the Nygren chance, the visitors found it hard to generate chances for lone frontman Jonny Kenny or his substitute Yamada amid the absence of injured forwards Kelechi Iheanacho and Daizen Maeda.
Hearts regained their intensity and versatility in creating chances in the opposition half. The Greek forward, a standout performer of the club's scouting network, struck low past the goalkeeper from the just outside the area.
Almost straight away, the defender tripped the midfielder in the right side of the box and the penalty taker scored. And it could've been an more comprehensive victory, had substitute Ageu not been denied by the shot-stopper.
The visitors' performance after the break was partially encapsulated in two incidents involving record signing Arne Engles.
The set-piece from Engles delivery was in stark contrast to his European display in the Europa League win over Sturm Graz and the national team player was then booked for a cynical foul.
Hearts head coach Derek McInnes: "You see how hard the players work, the team spirit. That's not sufficient on its own to win games consistently.
"Our strength lies in, is good technical ability. You're witnessing it from multiple individuals who have been here before. Recent additions are eager to show that.
"We've got a good thing going at the minute, but it's only three points. It's important for us to keep winning. We've got much work ahead, plenty to improve. After the first two rounds is typically a benchmark of where you are."
The Celtic boss: "The second goal was disappointing from our perspective. We didn't move when the ball went back as a defensive unit so when they play it, they should have players offside but didn't. We have got to do better with the attempt.
"Plenty of matches to play for. It's only the beginning. It's just nine matches. Obviously, being eight adrift is not what we would want. The positive is there's numerous fixtures to play.
"We now have to focus on the here and now and look to find more consistency and more quality in our play."
Celtic are returning to their stadium on midweek against newly-promoted Falkirk (19:45 GMT). At the identical hour in the Scottish Premiership, Hearts are at their opponents' ground.
A gaming technology analyst with over a decade of experience in the casino industry, specializing in slot machine mechanics and trends.