The Ivory Coast international scored twice after setting up Hakan Calhanoglu's opener but victories for Atalanta and Inter, who scored in the 81st minute to overcome Empoli 2-1, forced the Rossoneri to settle for fifth and a place in the Europa League.
It had appeared as though the visitors would leave Stadio Paolo Mazza without holding up their end of the bargain after Francesco Vicari and Mohamed Fares erased a two-goal deficit.
Kessie's 66th-minute penalty ensured that would not be the case, but Gennaro Gattuso enters the off-season on shaky ground.
Full-time— AC Milan (@acmilan) May 26, 2019
The Rossoneri claim all three points in Ferrara to end the season in fifth place
Tre punti a Ferrara: la stagione si chiude con il quinto posto in classifica#SPALMilan 2-3 #ForzaMilan pic.twitter.com/pXkVa5AleQ
Calhanoglu stung Emiliano Viviano's palms early on but gave the goalkeeper no chance with his next attempt, clinically picking out the bottom-left corner in the 18th minute.
Having provided a measured pass from the right for the opener, Kessie used his left foot to lash the visitors into a two-goal lead five minutes later.
Gianluigi Donnarumma was forced off with a muscle injury between those well-taken strikes and his replacement Pepe Reina had to pick the ball out of the net in the 28th minute after Vicari flicked on Alessandro Murgi's free-kick with his head.
And the scores were level within eight minutes of the restart, Fares rising well to nod in Thiago Cionek's lofted cross.
Cionek, however, offered the Rossoneri a chance to regain the lead by clumsily bundling over Krzysztof Piatek in the box.
Kessie made no mistake with the resultant penalty and, after the woodwork denied Sergio Floccari late on, Milan began looking for comfort in a 68-point haul, their best return since they last qualified for the Champions League in 2012-13.
What does it mean? Gattuso left waiting for answers
Milan have made strides this season, finishing in their highest position in six seasons, yet Gattuso remains far from certain to be in charge come the start of next term.
The club's former midfielder and favourite son insisted before Sunday's match that no Champions League demands had been made of him, but another year spent toiling in Europe's second-tier competition will weigh on the minds of those in power as they plot their next move.
Kessie a bright spark for Rossoneri
Milan look likely to send the on-loan Tiemoue Bakayoko back to Chelsea but will be eager to ward off any interest in midfield partner Kessie. The 22-year-old midfielder demonstrated the danger of his forward runs from deep by playing a part in all three Milan goals, including supplying the cross that led to the decisive penalty.
Cionek's clumsy challenge spoils SPAL comeback
Nothing in this match will have taken the shine off SPAL's successful season but boss Leonardo Semplici would have preferred defender Cionek did not make contract with Piatek when the match was in the balance.
Key Opta Facts
- Kessie scored and provided an assist in the same Serie A match for the first time.
- Only Liverpool (19) have scored more headed goals than SPAL (17) in the top-five European leagues in 2018-19.
- Milan scored two goals in the first half of an away match for the first time in Serie A this season.
Milan must decide whether to stick or twist on Gattuso as they begin planning for a third consecutive season in the Europa League, success in which should be a realistic objective.