The most popular version is:
But it's an unsupported anecdote, which is very close to urban legend.
A library reference request was recorded regarding this topic, and the librarians' conclusion was, they could find no direct source for the story, though many books cite it in various forms from hearsay.
That said, this episode itself I think makes one of good illustrations about how translation—or adaptation—was practiced in early modern period where the East and the West started to communicate.
By the way, 死んでもいいわ for "I love you" is not strictly true, either.
According to this article, the expression 死んでもいいわ appears in the translation by 二葉亭四迷 of Asya by Turgenev. The original passage was, however:
— Ваша... — прошептала она едва слышно.
(И. С. Тургенев, Ася (1857))
"Yours". . . she murmured, hardly above a breath.
("Acia", A Lear of the Steppes and Other Stories, tr. by Constance Black Garnett (1899))