Finish Classic mode. Any difficulty level will do.
Get Marth to join your party in The Subspace Emissary.
With the exception of the last of the three methods listed above, you’ll need to face Marth in a brawl and beat him after satisfying the above conditions to unlock him.