More than 5,000 members of the Armed Forces had alcohol abuse noted on their medical records in the last four years, figures show.
Almost 600 personnel, from the Royal Navy, the Royal Marines, Army and the RAF, had drug abuse recorded on their files, according to the Ministry of Defence (MoD).
The figures, released following a Freedom of Information request and reported by the Daily Mirror, cover the period between January 1 2014 and December 31 2017.
In those four years, 5,089 personnel had "at least one read code for alcohol abuse/misuse entered onto their electronic primary health care record", while 583 personnel had "at least one read code for drug abuse/misuse", the MoD said.
The MoD also said that it is not possible to determine from the health records whether the code entered refers to drug and alcohol abuse from before or during service.
In its response, the MoD said: "As within wider society, there is no quick fix to reduce alcohol misuse in the Armed Forces.
"We provide a package of measures to educate personnel on the dangers of alcohol misuse to help them make informed decisions, and have introduced extensive policy and guidance for commanders.
"We also have rigorous processes in place to discipline personnel who make poor choices regarding alcohol consumption, as well as treatment mechanisms in place for those with genuine alcohol problems."
Soldiers caught taking drugs can expect to be discharged, they said, adding that second chances may be considered in a "very small number of exceptional circumstances, where an uncharacteristic mistake is made by a young soldier".
Last year, Conservative MP Andrew Murrison said some 65% of the British military are at "high risk" for their excessive drinking.
Speaking last February during a backbench debate in the Commons on the Armed Forces Covenant Report, he said: "Now some will say 'that's up to the individual, it's got nothing to do with combat'.
"I would say, actually, the culture in our Armed Forces is such, and I've seen it for myself over many, many years, is one of encouraging the abuse of alcohol."