Quitting a job after spending ahead on a grant Let's say that I take a position at a university, and the university gives me a grant of $X for 2 years. I use the grant to buy a bunch of equipment and make some international trips, which costs me three quarters of $X. After one year, I decide to quit to take another job elsewhere, and I cannot take the grant with me as it was from the university.

What typically happens in this situation? Is it possible for the grant to get prorated ($X/2 per year), in which case I would have overspent my budget by a quarter of $X? If not, are there any other repercussions?
Most grants are not given in a lump sum, but in a sequence of increments---typically 12-months increments, but sometimes shorter or longer. 

It is true that when you get a chunk of money for a increment, there is typically quite a bit of flexibility in how you spend it within a phase (though some funder require notification if you go significantly "off plan").  You cannot spend more than you've been allocated, however, and asking for an increment in advance is typically either impossible or else requires negotiation and approvals from the funder.

In your hypothetical situation, then, if the funder (university or external) gave all of the money up front, and the spend plan was within contractual bounds, they really have no place to object if you happened to spend it faster than anticipated (assuming no other regulations were violated).

However... the money was never actually yours. It belongs to your institution in some way (probably via your department via appropriate contracting and accounting personnel), and you probably never even had the right to sign for the money.  You were just given authority over allocating its expenditure.  As such, when you leave, the remaining money (and any tangible assets, like equipment) stay in place.  The money will likely go away, since the terms of the grant specified key personnel (you) who are no longer available, but if the parting is friendly enough it may be possible for somebody else to take responsibility and the project to continue with you as a subcontract or consultant.

Reputational consequences based on the particulars of how you quit, of course, are another matter entirely.