A friend of mine has had luck with a Freeze-heavy mage.
Between cones of cold, water elemental, and frost nova, you should be able to protect yourself while establishing board presence.
Don't forget to add two Flamestrikes to your deck -- they'll wipe all of Anub's 4/4 Nerubians at once, which is great for in the late game when he's managed to keep 2 or 3 on the board.
Your goal is to survive long enough to drop big minions and waste him.
Alexstrasza (if you have her) will deal a quick up-to 30 damage for you, while big minions like Boulderfist Ogres can take hits from the 4/4 Nerubians, and wail on Anub if left unattended.
I was able to field Gruul as well.
Beyond that, keep some beefy taunt minions with at least 5 health
(Sen'jin and Sunwalker are good choices) to soak up and outpace his minion growth.
Finally, Anub will only use his hero power if he can't play cards -- with a little luck, you will have fewer 4/4s to deal with, and eventually be able to push through.
Good luck!
gaming.stackexchange.com/users/336/Raven Dreamer
I used priest my first play through.
The deck was essentially the same as the 'Amaz' deck, but I ran two Sunwalkers instead of Rag and Faceless.
You could also run Mass Dispel, Sunfury Protector/Defender of Argus with Ancient Watchers and/or Silence.
I've noticed a lot of other people finding themselves at a point where they have drawn their deck and fatiguing before they win.
Alternatively you could run Freeze Mage or Control Mage, like the deck @Raven_Dreamer mentioned.
I've also beaten Anub'Rekhan with the new Zoo variant that Kolento has introduced.
There is a fair few guides on reddit that go more in depth.
gaming.stackexchange.com/users/83160/Jam
A lot of good advice already, but Druids are also pretty handy.
The idea is to throw up a wall of powerful taunt minions like Druid of the Claw and Ironbark protector, and buff other minions into powerful taunters with cards such as Mark of the Wild and Mark of Nature.
Do this as fast as possible with the help of Innervate and Wild Growth.
When you're well protected, you can start throwing down cards like Starfall, Starfire and Swipe in addition to attacking with your minions to finish off the boss.
There are other more powerful Druid cards that fit with this plan too, but if you've got access to those, you probably don't need me to tell you what they are (Ancient of War etc).
gaming.stackexchange.com/users/63056/Bob Tway
I've used this cheap druid deck on Hearthpwn (Adurin's F2P Anub & Faerlina Normal/Heroic Ramp Druid).
http://www.hearthpwn.com/news/567-the-arachnid-quarter-heroic-boss-deck-guides
The theory there is -
you have a lot of high hp taunts, where Anub will run his minions in.
Then on turn 3 where he gets the 2/8 taunt you are good to go, as soon as this minion is killed you get one of your high value taunts on the play field and win easily from there.
For the sake of completeness of the answer the decklist: 2x Defender of Argus2x Keeper of the Grove2x Sunwalker2x Druid of the Claw2x Earthen Ring Farseer2x Harvest Golem2x Chillwind
Yeti2x
Ironbark Protector2x Lord of the Arena2x
Sen'jin Shieldmasta2x Wrath2x Swipe2x Innervate2x Mark of the Wild2x Wild Growth
gaming.stackexchange.com/users/83179/Vulcano
There's a lot of different answers, but I beat him with a relatively cheap Paladin deck after a couple of tries.
Truesilver/Peacekeeper/Equality etc.
are very effective at dealing with his hero power.
Just be sure to play a lot of taunts.
gaming.stackexchange.com/users/83164/ant11
I beat rekhan with a freeze mage deck as well.
Used Mirror Images, Ice Barriers, Frost Bolts, Ice Lances to slow down the assault, then Frost nova, doomsayer a full board that included one of those 2/8 taunts that summons a creature from my deck.
Alexstrasza comes out, plus 2 Molten Giants I summoned from my hand after the Doomsayer exploded.
Win.
2x
Ice Lance2x Mirror Image2x Frost
Bolt2x Doomsayer2x Arcane Intellect2x Frost
Nova2x
Ice Barrier2x Vaporize2x Kirin Tor Mage2x Cone of Cold2x Fireball2x Blizzard2x Flamestrike1x Alexstrasza1x Pyroblast2x Molten Giant
gaming.stackexchange.com/users/83463/bsctgod
I was able to beat rekhan on the 2nd try with a freeze mage variant.
9th turn alex, 10th turn 2x frost bolt 2x ice lance and hero power.
you will need loot hoarders, coldlights, and novice engineers to get to the optimal hand.
it's basically an OTK mage without the spell damage cards.
gaming.stackexchange.com/users/79735/josephus
I won quite easily with secret Hunter deck: 2x hunter's mark 2x arcane shot 2x abusive sergant 2x timber wolf 2x explosive trap 2x freezing trap 2x misdirection 1x snake trap
(I only have one) 2x snipe 2x dire wolf alpha 2x
eaglehorn bow 2x animal companion
2x dead shot 2x unleash the hounds 2x mind control tech 1x savannah highmane (probably useless in the deck) Mage deck with freezes and removals would be my second choice - freeze all minions into doomslayer could be really worthy there.
gaming.stackexchange.com/users/22504/Santhos
I found ramp Druid to be very effective on this fight, and managed to take him out nearly unharmed on my first attempt with a turn 3 taunted Ancient of War.
I think any deck with a lot of taunt minions with attack >= 4 and health > 4 should be able to deal with him relatively easily, so a ramp or midrange Druid should be a solid choice.
gaming.stackexchange.com/users/83575/audunskj
I have a different deck people never seemed to consider.
I ran a warlock deck with lots of cheap efficient creatures.
I also had a lot of those 4 damage to create spells and other things good at removing creatures.
Essentially everything in my deck was super cheap and extremely efficient for cost.
Using the warlock ability I was able to get an extra card each turn which allowed me to gain control of the board quickly and keep it.
gaming.stackexchange.com/users/69084/dphil
Between the 45 health, the 4/4 creatures every round, and the fact that he always gets a coin, I'm really struggling to beat this one on Heroic.  What are some strategies I should follow when building a deck to beat this solo encounter?    Which class is best suited?  What cards would be most effective?
How can I beat Anub'Rekhan on Heroic?
gaming.stackexchange.com
<hearthstone>
gaming.stackexchange.com/questions/177966
gaming.stackexchange.com/users/8096/Beofett
Try using a Freeze-heavy mage. You goal is to survive long enough to drop big minions. Run a warlock deck with lots of cheap efficient creatures. While it is possible to beat Anub'Rekhan with more or less any deck, the most common tactic is frost mage based builds.
The community lists builds and tactics.