In the 16th century Sefer Ma'seh Nissim of R. Juspa of Worms,* however, we find a slightly different version of the famous story. There the version is that R. Meir of Rothenburg refused to be redeemed for more than 500 gulden.
Based on that version, we can piece together a possible history of the story. Possibly: R. Meir of Rothenburg refused to be redeemed at the price demanded by Rudolf I King of the Romans. At some point an agreed upon price was reached, but R. Meir of Rothenburg died before it could be collected. If that is what happened, it makes sense that a tradition developed that he had died in prison because he refused to be redeemed, since had he not delayed being redeemed at the higher price, he would have left prison alive.
*Shelomo Eidelberg. 1991. R. Juspa, Shamash of Warmaisa (Worms). Jerusalem: Magnes Press. pp. 80-81 [english], 78-79 [hebrew]