"Had I been president, Captain Khan would be alive today. We wouldn't have been in this horrible, horrible mistake, the war in Iraq," he said.
The soldier's father, Khizr Khan, said it was a "cruel" remark.
He is campaigning for Hillary Clinton, who is making her first appearance with First Lady Michelle Obama.
The two shared a stage at Winston-Salem in North Carolina.
Introducing Mrs Obama, the former first lady said her voice was needed in this election "more than ever".