Many shrines put chinowa (braided straw ropes) at the entrance to the shrine at New Year’s and other times of purifications. Worshipers at the shrine pass through the ring as an act of purification from misdeeds, impurities, or bad luck.According to the Encyclopedia of Shinto, they originate with Somin Shōrai, a legendary hero who tied a magical ring braided of cogon grass around his waist to escape an epidemic.

Thanks to Ojisanjake from the excellent blog, “More Glimpses of Unfamiliar Japan” for pointing out that this is not a Shimenawa, as I’d thought.