The commission in Sydney is this week is looking at urgent issues contributing to suicide among the ADF community, such as negative experiences with the Veterans Affairs' Department and long wait times on compensation claims.
On Wednesday, an anonymised veteran told the inquiry that as an army recruit he was assaulted with a dildo by a female instructor, who during the ordeal also said to him: "Do you love the cock?"
The "dildo incident" was also perpetrated on a number of other recruits, the inquiry was told.
The veteran said he gave evidence about the "belittling" incident to a military court but that the issue was "thrown out the window".
"She hadn't been charged with any serious misconduct," he said.
After that, in 2011, the veteran was deployed to Afghanistan on a "mixed" base alongside Afghan National Army troops where he said he became concerned about sexual assault.
The commission was told that Afghans at the patrol base would regularly "bring in children" and be sexually abusive to them.
"I had an incident that happened to me prior to going on ... my leave," the veteran said of his time on the base.
That incident, the veteran said, was when Afghan troops invited him for a cup of tea and offered him what he thought was tobacco.
The veteran said he consumed the black substance then recalled his pulse racing and "coming to" on his back, with a bloody mouth.
He then returned to his quarters on the base where he "sort of processed what had occurred", before seeking treatment from a medic.
"I didn't really want to believe it but I knew what had happened, and then one of the ANA made out a gesture and I knew," he said.
The veteran said: "My feeling is that I've had a war crime occur to me."
When he returned from overseas, the veteran started to abuse drugs and alcohol, gamble heavily, and thought about suicide after comrades in his unit took their lives, before he was discharged in 2017.
He received around $500,000 in total compensation from the ADF but gambled alot of it away and was forced to sell his war medals for cash.
Earlier, Bonny Perry, the widow of ADF sniper Andrew Perry, who took his own life, testified that her husband came back "broken" from Afghanistan in 2013, and went downhill until his death two years later.
He became hypervigilant, controlling, narcissistic, nervous and could not relax, while at other times he "slept for days".
"He lost the joy for life and everything became a job to him," she said.
He no longer cared about his safety, which led to him chasing crocodiles at a billabong because he wanted them to eat him, Ms Perry said.
"He was just doing all these risky things ... I don't know whether they were cries for help or he, at that stage, just really did want to go."
Ms Perry said the ADF missed many "red flags" before the veteran took his own life following eight suicide attempts.
"When they come back and everyone knows they're broken we should be supported," she said.
When she warned defence that Mr Perry was at risk of suicide, Ms Perry said she was ignored, with authorities telling her he was a "shit husband" and would not "do anything".
Suicide rates are 24 per cent higher for ex-serving men and double for ex-serving women, compared with the general population, according to federal government data.
Lifeline 13 11 14
Open Arms 1800 011 046