He was born in Jersey City but grew up in Westfield, New Jersey. His father was an immigrant from Egypt. His mother was an immigrant from Italy. His mother was Catholic, but Ashmawy was reared in his father's faith tradition and grew up as a practicing Muslim.
Ashmawy attended George Washington University, earning both an undergraduate and a law degree. He joined the United States Air Force after law school, serving in the Judge Advocate General's Corps (JAG). As JAG staff, he was one of the four prosecutors on the Salim Hamdan terrorism case.