Bernard and Ismaily scored to send Shakhtar Donetsk through as Group F runner-up after a 2-1 home win against already-qualified Manchester City at Metalist Stadium.
City's first defeat in any competition since April ended its 11-match winning streak away from home, although Pep Guardiola named an experimental team with an eye on Monday's (NZDT) Premier League derby at Manchester United.
Teenager Phil Foden was given his full debut, becoming the youngest Englishman to start a UEFA Champions League game, with Gabriel Jesus, Leroy Sane, Ederson and Fernandinho the only regular starters included, and City's lack of cohesion proved costly.
Shakhtar knew a draw would be enough to send it into the knockout stages, regardless of Napoli's result at Feyenoord, but it took the lead after 25 minutes, Bernard beating Danilo and bending a fine shot beyond Ederson after Marlos did superbly to create space.
Right-back Danilo was at fault again six minutes later when Shakhtar extended its lead, a ball over the top from Marlos sending Ismaily clear and, when Ederson raced out of his box without getting the ball, his finish into the gaping goal was straightforward.
City improved after the break, Sergio Aguero netting a stoppage-time penalty after Jesus was tripped, but Shakhtar closed out its third home win of the group stage, denying Guardiola's men the chance to qualify with a perfect record from Group F.