Khawaja was a constant thorn in England's side, scoring 141 during the Aussie's first innings at Edgbaston.
It was Ollie Robinson who eventually got the opener out, not before he had been dropped a couple of times.
Robinson appeared to send a few expletives his way after sending Khawaja's off-stump cartwheeling out of the ground.
The England squad joined in the celebrations, but Root broke off from the group to give the Australian batter a pat on the back.
One wrote on social media: "Ollie Robinson with the double f-bomb send-off for Khawaja. Meanwhile, Root congratulated him. I wonder which one was classier."
Read more on The Ashes
Moeen Ali punished after being caught spraying substance on his hand during Ashes Test
Steve Smith blasted by fans for gesture to Harry Brook after fluke Ashes wicket
Another said: "Joe Root gives Ollie Robinson an abject lesson in sportsmanship. Just after Ollie tells Usman to 'f*** off', Joe goes out of his way to congratulate Khawaja on his innings. Class act."
One added: "Robinson giving Khawaja a send off after he has scored 141 and has been at the crease for 4 sessions is honestly one of the dumbest things I have seen in test cricket.
"Credit to (I think) Root for patting Khawaja on the back as he left."
England took the last five wickets for 75 in the morning session to get Australia all out for 386, giving the hosts a slender seven run lead.