In ancient Rome, the fourteenth day of February was a pagan holiday which honoured Juno, the goddess of women and marriage. The next day they would celebrate the Festival of Lupercalia, honouring Juno and Pan. Fertility rituals were performed on this day.
During the reign of Emperor Claudius II, his armies lacked the sufficient number of soldiers it needed.
But, Claudius thought that the young men didn't want to leave their wives, families and girlfriends hence did not join the army. So, he introduced a new law and canceled all of the marriages and engagements in Rome.
But Valentine, a priest in Rome, did not believe in the Emperor's new law, and he refused to abide by it.
He started performing wedding ceremonies secretly. One day, the emperor’s soldiers caught him performing marriage ceremonies and they dragged him to the stand before Claudius. The Emperor ordered the Bishop to be put to death for the violation of law.
While he was in prison, waiting for his execution, many young couples threw notes of thanks along with flowers and other gifts into the window of his cell.
Even the jailer’s daughter admired him and her father allowed her to visit Bishop Valentine in his cell. During these visits, the two would talk and laugh and share each other's thoughts.
On the day of his execution (14 February 270 AD), Valentine wrote a note to the girl telling her that he loved her. He signe, ‘From Your Valentine’.
Later, in 496 AD, Pope Gelasius did away with the pagan festival of Lupercalia, citing that it was pagan and immoral. He then chose Bishop Valentine as the patron saint of lovers, who would be honored at the new festival on the fourteenth of every February.