When Nietzsche praises egoism it is always in an aggressive or polemical way, against the virtues, against the virtue of disinterestedness (Z III Of the three evil things). But in fact egoism is a bad interpretation of the will, just as atomism is a bad interpretation of force. In order for there to be egoism it is necessary for there to be an ego.
p. 7 - Nietzsche and Philosophy (1962)