Under specific circumstances a Federal Direct Loan can be discharged (canceled) but you must not be in default* on the loan. A discharge releases you from all obligation to repay the loan.
Your loan may be discharged because of the type of work you do: teaching in a designated low-income school, for example. Get the latest information on loan discharge.
* Your loan can't be cancelled because you didn't complete the program of study at your school (unless you couldn't complete the program for a valid reason - because the school closed, for example). Also, cancellation isn't possible because you didn't like the school or program of study, or you didn't obtain employment afterwards.