You recall that incorrectly :) The NeXT purchase came first, Jobs as CEO came after that. But yeah, it was a bit of a reverse takeover in a way.
A decade or so later, Apple was on the tail end of a long, slow, downward slide. The team wasn't happy with the current state of their Mac operating system, and bought out NeXT to use their software as the basis of its replacement (Mac OS X).
Jobs, as CEO of NeXT, came back to Apple as a consultant, but was CEO again in a matter of years.