In Act II Sc. 7 the Prince of Morocco arrives in Belmont to try his luck in winning Portia. He is led to the room where the different caskets are kept. After debating and reasoning within himself he finally chooses the golden casket only to discover that he has foolishly made a mistake. The Prince of Morocco was dazzled by the exterior appearance of the golden casket and was misled into making the wrong choice. He assumed that since Portia was very beautiful her picture would be kept only in the golden casket. Only after he had made the wrong choice is he reminded of the proverb, "all that glitters is not gold."
The irony however lies in the choice that he does not make. While debating and considering carefully the choice of the three caskets placed before him, the Prince of Morocco rejects the leaden casket saying to himself,
The irony of course is that it is the leaden casket which contains Portia's picture. The irony is that although the Prince of Morocco rejects the leaden casket assuming that it is not worthy of containing Portia's picture Bassanio in Act III Sc.2 chooses this very same leaden casket for this very same reason while rejecting the golden casket for the very same reason that the Moroccan Prince chose it:
"So may the outward shows be least themselves:
The world is still deceived with ornament.
Therefore, thou gaudy gold,
Hard food for Midas, I will none of thee;
Nor none of thee, thou pale and common drudge
'Tween man and man: but thou, thou meagre lead,
Which rather threatenest than dost promise aught,
Thy paleness moves me more than eloquence;
And here choose I; joy be the consequence!"
The irony was also that the whole lottery system (choosing of the caskets) was done by Portia's father to protect her.
The Prince of Morocco is the type of man the father would have chosen for her had he been alive. He was a prince, wealthy (and hence not after her money like Bassanio) and seemed genuine.
Therefore, the plan to have the right guy marry Portia backfired in the father's face.