All things considered, there are a few options. Most will probably only get your opponent to switch Aegislash out.
Option one: Prankster
Probably the most effective/ common counter, basically stop Aegislash before it can even set up a Swords Dance. Shadow Sneak is only +1, and if Aegislash has no speed EV investment (which it usually doesn't), all three Prankster Pokemon will out speed it.
Sableye @ Leftovers
Ability: Prankster
EVs: 252 HP, 136 Def, 120 Sp. Def
Nature: Impish
-Will-O-Wisp
-Taunt
-Recover
-Foul Play
Probably the best way to handle Aegislash is to burn it and get that attack drop before it can do anything. Sableye won't be affected by King's Shield either, considering that Foul Play, while making contact, is calculated by the attack stat of the opponent, but will receive STABonus from Sableye's typing. You could also run a Scarf trick set and trap Aegislash into one move.
Klefki @ Leftovers
Ability: Prankster
EVs: 252 HP, 136 Def, 120 Sp. Def
Nature: Bold
-Substitute
-Spikes/ Thunder Wave
-Torment/ Thunder Wave
-Foul Play
Klefki doesn't resist either of Aegislash's main moves - Shadow Sneak & Sacred Sword - but it does learn Foul Play, which means like Sableye, it won't care about the King's Shield attack drop.
Whimsicott @ Leftovers
Ability: Prankster
EVs: 252 HP, 252 Def, 4 Sp. Def
Nature: Impish
-Substitute
-Leech Seed
-Encore
-U-Turn
At base 116 speed, Whimsicott will definitely out speed Aegislash. Set up a substitute & Leech Seed, then Encore trap it into Swords Dance or King's Shield, and proceed to stall.
Option two: Shadow Sneak counter
I was this close to suggesting Excradrill & Heatran, and then I remembered that Steel no longer resists Ghost.
These counters hinge on countering Aegislash's main move, Shadow Sneak, considering that it's so slow it can't get Sacred Sword out before getting KO'd.
Darkrai @ Focus Sash
Ability: Nightmare
EVs: 252 Sp. Atk, 252 Speed, 4 HP
Nature: Modest/ Timid
-Dark Pulse
-Dark Void
-Nasty Plot
-Substitute/ Focus Blast
Bisharp @ Leftovers
Ability: Defiant
EVs: 252 Atk, 204 Speed, 52 HP
Nature: Jolly/ Adamant
-Swords Dance
-Sucker Punch
-Low Kick
-Substitute/ Night Slash
Darkrai & Bisharp are two of the few Pokemon resistant to Shadow Sneak, considering that only Dark resists Ghost. Darkrai is often sashed, so it'll definitely survive Shadow Sneak. Bisharp is unaffected by King's Shield because of Defiant, so even if it uses a move that makes contact, its ability cancels out King's Shield.
Arceus-Normal @ Silk Scarf/ Leftovers
Ability: Multitype
EVs: 200 HP, 252 Atk, 56 Speed
Nature: Adamant
-Swords Dance
-Extreme Speed
-Shadow Claw/ Earthquake
-Recover/ Brick Break
Arceus is tricky. ExtremeSpeed set is Arceus Normal's best set, but also means running a physical set which will cause Arceus to be affected by King's Sword if you run Shadow Claw to deal with Giratina. However, if Arceus runs Earthquake, the attack drop from King's Shield will not activate. It's a choice to make depending on the rest of your team and whether Aegislash or Giratina are more common in ubers, when everything's fully tested and the tiers are all sorted.
/
Meloetta @ Expert Belt/ Life Orb
Ability: Serene Grace
EVs: 64 Atk, 252 Sp. Atk, 192 Speed
Nature: Naive
-Shadow Ball
-Relic Song
-Close Combat
-Psychic
Meloetta-P will be an OU counter to Aegislash, if it's not banished to Ubers forever. You can run either mixed or Calm Mind sets, but Shadow Ball is the only necessary move for Meloetta to successfully counter Aegislash. Meloetta also has the benefit of taking fighting hits neutrally because of her/its typing in normal form.
Smeargle @ Focus Sash
Ability: (who cares)
EVs: 252 HP, 252 Speed
Nature: Timid/ Modest
-Spore
-Quiver Dance/ Shift Gear
-Substitute
-Baton Pass
Smeargle can just Spore, set up a Substitute and then Baton Pass some stat boosts to something that can deal with Aegislash. At base 75 speed, Smeargle will definitely out speed Aegislash, so even if it uses Sacred Sword, just use Spore again.
Option three: phaser
Lugia @ Leftovers
Ability: Multiscale
EVs: 252 HP, 176 Def, 80 Sp. Def
Nature: Bold
-Roost
-Whirlwind
-Thunder Wave/ Toxic
-Ice Beam
Skarmory @ Leftovers
Ability: Sturdy
EVs: 224 HP, 252 Def, 32 Sp. Def
Nature: Impish
-Roost
-Whirlwind
-Spikes
-Brave Bird
Note that phasing is only a temporary solution to Aegislash; it's just to reset any Swords Dances it might have set up.
Lugia is weak to Shadow Sneak, but it should survive with Multiscale, though not too sure about after one Swords Dance. Skarmory should survive Shadow Sneak after one Swords Dance, as long as it's at full health since it has Sturdy.
Option four: Tank
Landorus-T @ Leftovers
Ability: Intimidate
EVs: 248 HP, 172 Def, 88 Speed
Nature: Naive/ Jolly
-Earthquake
-Stone Edge/ HP Ice
-U-Turn
-Stealth Rock
While Intimidate does not fully negate Swords Dance, it's still nice to have it help out Landorus-T's bulk. It should survive one Swords Danced Shadow Sneak; then you can just use Earthquake to deal with Aegislash.
Swampert @ Leftovers
Ability: Torrent
EVs: 240 HP, 16 Atk, 252 Def
Nature: Impish
-Earthquake
-Waterfall/ Scald
-Stealth Rock
-Roar/ Toxic
Tank Swampert; there's not much else to say. Swampert will also be able to phase Aegislash out, but it's probably better just to use Earthquake on it to get the job done.