Attaining jannat-ul-Firdous is mentioned in the Holy Qur'an in verse 18:107:
18:107 As to those who believe and work righteous deeds, they have, for their entertainment, the Gardens of Paradise,
Just Firdous is mentioned in verse 23:11:
23:11 Who will inherit Paradise: they will dwell therein (for ever).
Now, it is in Surah 23 in which you will find the explanation of those who attain firdous:
23:1 The believers must (eventually) win through,-
23:2 Those who humble themselves in their prayers;
23:3 Who avoid vain talk;
23:4 Who are active in deeds of charity;
23:5 Who abstain from sex,
23:6 Except with those joined to them in the marriage bond, or (the captives) whom their right hands possess,- for (in their case) they are free from blame,
23:7 But those whose desires exceed those limits are transgressors;-
23:8 Those who faithfully observe their trusts and their covenants;
23:9 And who (strictly) guard their prayers;-
23:10 These will be the heirs,
23:11 Who will inherit Paradise: they will dwell therein (for ever).
I don't think there is any more clear and better explanation than this on how to attain Jannat-ul-Firdous. Allah has explained it in His Book.