He knew he was a criminal.
He was very well aware of what he did and for who he was working. But John was family, he was like a father to him and Ward had swore to follow him to hell and back. So he took orders and never questioned anything. Never, up until the point he met Skye and question marks kept popping left and right. Still, he stayed loyal to John, to the one person that made sense even when his mind kept screaming at him to follow Skye.
It did not turn out the way he expected it to. Things didn't work out, John did not get better and Skye would never forgive him and in the blink of an eye he lost both a father figure and the woman he loved unconditionally. So when the time came, when he paid his dues Ward turned himself in ready to take any punishment the law would lay on him. Because he did bad things and he had to pay for them.
Now what happened after that?
That's a story for another time.