Sexual orientation details are stored by the MoD but kept anonymous, and recruits have the option to "prefer not to say".
A spokesman said the MoD, which introduced the new measure in November, "encourages diversity at all levels".
Openly-gay soldiers have been allowed to serve since 2000.
The spokesman said: "The MoD proudly encourages diversity at all levels. Service personnel are now encouraged to declare their sexual orientation.
"Although this is not mandatory, collecting this data will give us a better understanding of the composition of our armed forces and help ensure our policies and practices fully support our personnel."
Recruits are also invited to say how open they feel they can be regarding their sexual orientation.
The gathered information is not visible on individual personal records or to chain of command or managers, with names removed before the data is collated to make sure no one can be identified.
The MoD said there was no specific drive to recruit more lesbian, gay or bisexual personnel.
The Ministry of Defence is now asking recruits to the armed forces whether they are gay in a bid to improve diversity in the military.