How can I stop NPCs from following me?

Solution 1:

I'd try using the disable and then enable command on Aela the Huntress and each of the other unwanted followers. This should 'reset' them. Make sure you have a savegame before you try console commands, so you can revert to a previous save in case anything goes wrong or if it doesn't work.

Other console commands you might want to try: paycrimegold <0-1> <0-1> 267EA ('267EA' is Whiterun's faction ID - you could also try targeting each of the unwanted followers instead of a faction ID), recycleactor and resetAI. See if the issue persists after fast traveling.

paycrimegold pays your bounty and will help if the game or some NPCs consider you to have a bounty. recycleactor and resetAI are supposed to 'reset' an NPC.

More info on console commands here: http://www.uesp.net/wiki/Skyrim:Console_Commands

This similar question to yours, 'I have an imperial following me and I don't know how to shake him' also has a solution that you might want to try if you'd rather not use console commands or are playing on a console (shamelessly quoting it here):

I've had this problem on XBox, where Hadvar, the imperial who helps you (after trying to execute you) at the start of the game, would continuously follow me wherever I went after completing the civil war quest...

First, move very close to him [the unwanted follower], up to the point where you are touching him. Then, save your game. Make sure you don't override a saved game in case this doesn't work. Then shut off your console completely and reload the game you just saved...

If this doesn't work, I've heard people say that this can be fixed if you crouch when touching him before saving.

Originally posted by Nathan Sabruka at https://gaming.stackexchange.com/a/82827/4797