For this achievement you will need to beat all 10 of the secrets and then beat world 5. Upon doing so, the final room will have a new powerup for infinite jumping. If you use this in the first level to keep going up at the start, you will get the 'good ending' and this achievement.
The locations and clearing of the secret levels are in my accompanying vid: