The current Imamiya-jinja Shrine is said to have originated in May 1001 when the temple was built in the current location and the three gods were enshrined after Goryo-e (ritual ceremony to repose of spirits of a deceased person) was performed in Mt. Funaoka in 994, but the year of establishment at the current location is unknown, although it has long been a shrine enshrining Susanoo (currently, sessha (auxiliary shrine - dedicated to a deity close-related to that of a main shrine) Eki-jinja Shrine), the god of epidemics.
現在の今宮神社は、994年（正暦5年）船岡山で御霊会が行われた後、1001年（長保3年）5月に現在の場所に神殿が造営されて3柱の神が祀られたのに始まるとされるが、現在の場所には創建年代については不明であるが、古くから疫病の神とされるスサノオを祀る社（現在摂社疫神社）があったという。