If you were given a loan or a gift with certain conditions, you should not spend it on anything else
Question

I have recently participated in a competition organized by a company in which I had to present a development project idea. I won the competition, and the organizing company has given me some money to start my project.
I am now in debt, and I was wondering if if was lawful for me to spend that money to pay my debt and then replace in the future by the end of this year, and then invest in my project.
The debt in question is one I owe to my university, and I will no be able to graduate and receive my diploma this semester if I dont pay as soon as possible.
Praise be to Allah.It is not permissible for you to spend this prize on anything other than what was stipulated by the company that organised the competition.
That is because the Muslim is enjoined to fulfil covenants and promises, as in the verses in which Allah, may He be exalted, says (interpretation of the meaning):
“O you who believe! Fulfill (your) obligations”
[al-Maa’idah 5:1]
“And fulfil (every) covenant. Verily! the covenant, will be questioned about”
[al-Isra’ 17:34]
“Those who are faithfully true to their Amanât (all the duties which Allâh has ordained, honesty, moral responsibility and trusts)”
[al-Mu’minoon 23:8].
So it is not permissible for you to spend this money on anything other than the project stipulated, unless the company that awarded the prize gives you permission to do otherwise.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) said:
In our view the basic principle concerning that is that whoever takes money from people for a specific purpose or cause should not spend it on anything else except after seeking their permission.
End quote from al-Liqa’ ash-Shahri (9).
See also the answer to question no. 191708
And Allah knows best.