Yes the prophet did participate in the battles and he would fight. He did not hide in the back, this was used to cover up the others who were hiding in the back. He did carry weapons to defend himself as well.
There is an opinion that says he did not personally kill anyone. He would fight without killing. This is perhaps due to his mercy.