The Russian swimmer posted the image showing two young boys with their faces partially concealed.
In the image they brandished huge guns while smiling for the camera.
Korotyshkin said he emptied his pockets for the boys, but not before managing to post a picture onto the image-sharing site.
He said the incident took place near Ipanema Beach, and that the boys "parted amicably".
The Olympian also added that concerned pals should not worry as "all is well with me".