Jalal al-Din's family left Balkh in the east while he was a child, travelling west ahead of the Mongol advance, and settled at Konya under the Seljuk sultans of Rum, which is where the name Rumi comes from. He inherited his father's position, taught law and preached, and by his late thirties was an established and entirely conventional religious scholar.
The change came in 1244 with the arrival of a wandering dervish, Shams of Tabriz, who asked him a question in the street and with whom he then spent months in seclusion. The teaching stopped, the disciples resented it, Shams left, was fetched back, and finally disappeared, quite possibly killed. What came out of that loss was poetry: a vast collection of lyrics that Rumi published under his friend's name rather than his own, and then the Masnavi, some twenty five thousand couplets dictated over years to his disciple Husam al-Din, on walks, at night, while walking round a column, whenever the words came.
The Masnavi is a teaching poem that works by story: fables, jokes, obscene tales, arguments with the reader, all bent towards the single theme of separation and return, announced in the opening lines by a reed cut from the reed bed that cries for it. Later readers in Persian and Turkish called it the Quran in the Persian tongue, which was meant as praise and not as a claim of equal status. He died in December 1273, and the night is called his wedding night, the night of union. The funeral, according to the early biographies, was attended by the city's Christians and Jews as well as its Muslims.