Promising to make one’s share of mortgaged land a waqf, and intending to take back the mortgage
If the actual situation is as described, then this waqf is not valid, because the land is mortgaged, and you did not put the waqf into effect in practice; rather, you made a promise in the words: “I will make my share a waqf.” In the same way, if after redeeming the mortgage you make it a waqf, or you deal with it in any other way in accordance with the Shariah, then there is no harm in that.
Reference: Al-Lajnah al-Da’imah: 2880