Self-realisation is overcoming our desires to realise the Divinity that is everywhere. It frees us from this seemingly endless cycle of birth and death and in the process, we realise our true Self. It is the state of zero desires. It is the state of Perfection that we constantly strive for.
Serving humanity could be a way of overcoming desires to get to the state of Realisation. True service, when carried out selflessly without attachment to the fruit of the action helps us to reduce our stockpile of desires. And it is through this reduction of desires that we are able to discover that Divinity within. However, mere service to humanity without dedication of the action to the Self only creates more unselfish desires which keep us bound to the world. The key is to act selflessly, dedicating our actions to God.
Thus Self-realisation and serving humanity are not mutually exclusive objectives. However, not everyone who serves humanity i.e. does social service etc. moves closer towards Self-realisation. It is only those who act selflessly, perform karma yoga, who move towards the ultimate goal of Self-realisation.