Having already accepted a symbolic death and dedicated themselves to endless warfare against the Darkspawn in the Deep Roads, the Legion of the Dead are a force to be reckoned with. Naturally, such fearsome dwarves would be an asset to your Grey Warden during their battle to save Ferelden, but the Legion doesn't come along easily. To recruit them to the cause, you have be a master of the Coercion skill.
Recruiting the Legion
The Legion of the Dead can be recruited after you finish the main quest in Orzammar, "A Paragon of Her Kind." It doesn't matter who you chose to become the king of Orzammar, only that a King is crowned. Afterward, you can find the Legion's leader Kardol in the Diamond Quarter of Orzammar and persuade him to bring the Legion to the surface to battle the Blight -- provided you have the Master Coercion talent. The only exception is if you chose the Dwarf Noble origin for your character: no persuasion check is needed in this case.
Building Your Coercion
For everyone who didn't choose to be a noble dwarf, your only choice is to coerce Kardol. To do this, you must have at least a total of 16 points in your Cunning stat to make the Master Coercion skill available. This skill is the final tier in the Coercion tree, meaning you'll have to get the other skills first; Coercion, Improved Coercion and Expert Coercion. Rogues earn skills every two levels, while warriors and mages earn skills every three levels.