Term from German philosopher Immanuel Kant (1724-1804), who claimed to derive morality - in the form of an imperative valid for all rational beings - from reason.
The general idea was that I may not act in ways that I cannot, without inconsistency, will that everyone else should act in too.
Suppose that to gain some advantage I make a promise, intending not to keep it: were I to will that everyone may break their promises, I would in effect be willing for the institution of promising to break down; in which case I could not use it as I originally tried to.
The imperative is categorical because not conditional on one's own desires, like 'If you want money, work hard' (an imperative which Kant would call hypothetical). Problems arise in deciding when the categorical imperative does indeed apply, and whether hypothetical imperatives are really imperatives at all.
Also see: deontology
H J Paton, The Moral Law (1948); standard translation of Kant's main relevant work