Beat Target Smash!! on all difficulty levels (Playing in either 1 or 2 player mode will satisfy this condition.)
Get Lucario 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 Lucario in a brawl and beat it after satisfying the above conditions to unlock it.