The story
From IRC (Internet Relay Chat) and related systems, in which this command generates a text-based action performed by a user: for example, /me dances around might produce the message John dances around.
Etymology from Wiktionary, CC BY-SA 4.0.