So, the first thing is to keep in mind what he likes. Referring to the likes and dislikes of the departing individual you can go for your gifts. This will also include his interests and hobbies too. Or maybe if there is a hobby he wishes to pursue, you could perhaps be just the right person in trying to help him get ahead with his hobby.
Installing his military badge on a plague along with the number of years of service would be great too. If he is not retiring but just transferred to another work place, you could put the name and place of the company along with the years to remind him of his service in that particular place.
A framed photo of his first day at the military would just make one of the best military farewell gifts. Or perhaps, a great collection of his photos from his first day at the military academy to the last day or the farewell will just be perfect too.
Putting in a little bit of creativity, you could actually try making a short documentary on his achievements including the various medals received and present him the CD. This is just to leave him speechless and will definitely be one of the best military farewell gifts possible.