The loss was AIK's third consecutive away loss.
The opening goal came in the 55th minute when Elliot Stroud's free kick found its way between the AIK wall and behind a positioned Kristoffer Nordfeldt.
In the 83rd minute, the 2-0 goal came through Ludvig Tidstrand, which was his first in Mjällby.
It's really wonderful. It's fully booked at Strandvallen and I get to make my debut goal, I'm just completely ecstatic, says Tidstrand to HBO Max.
Already during the first half, Mjällby had a ball in the net, but then referee Fredrik Klitte blew for a free kick in favor of Nordfeldt.
"Means a lot"
The pressure from the away team was absent and Mjällby's first win against AIK in three years was a fact.
I think we make one of our best performances this year against a good team. I don't understand how they can run so much in this heat, says Mjällby coach Anders Torstensson.
This win means a lot for the guys and the fans.
AIK's two-goal scorer from the 3-0 win against Degerfors, Andronikos Kakoullis, had to start on the bench.
I will be able to say why in a few days, said Mikkjal Thomassen before the match.
Three suspensions
Instead, new acquisition Erik Flataker got to start, but could not save any points for the away team.
My feeling when I come in is that it feels like Mjällby is almost two men more than us. We are too spread out and too far from each other, every player who gets the ball is put in a tough situation. It's hard to play football today, says John Guidetti who jumped in with half an hour left.
I'm disappointed.
Besides the loss, Nordfeldt, Anton Salétros, and Dino Besirovic received yellow cards and will all be suspended in AIK's match against Öster.
Mjällby now leads the league with seven points ahead of second-placed Hammarby, who play later on Sunday. AIK is third.
Kruse goal scorer
In Studenternas in Uppsala, IFK Göteborg visited and takes all three points home.
Sirius started the match best and had a huge chance to score 1-0 after just over ten minutes of play. But in the way stood Elis Bishesari as so many times before.
IFK Göteborg played themselves up, and a quarter into the second half, David Kruse headed in Kolbeinn Thordarson's corner.
It became the only goal of the match, and Sirius has now lost four of their last six matches.
Sirius is now in thirteenth place in the league. IFK Göteborg is seventh.