Duo Duo, a German Shepherd, was put to patrol the camp at the time. It accidentally saw its handler.
It's claimed that Duo Duo refused to leave Wang - despite being told to by Wang.
When Wang and his colleagues gave their last salute to the guard post, Duo Duo suddenly sat up on its hind legs appearing to salute Wang.
The dog was said to do the posture spontaneously and it kept the posture for more than 10 seconds.
Duo Duo didn't put down its front legs until the group of soldiers finished saluting.
The picture has melted the hearts of thousands of people in China.
On Weibo, the Chinese equivalent to Twitter, one user said: "Some animals are more emotional than humans."
While another person wrote: "Please treat army dogs well after they retire."
Many other people expressed their love and respect for Duo Duo, as well as army dogs in general.