Remove the door along the hinges using a screwdriver. That won't be necessary if you've got a walk in closet, or if the door opens outward.
Clean out all of the clothes and other clutter in the closet to make room for your desk and office supplies. You may be tempted to try to have the space be a closet and an office too. This will only result in a space that isn't a very good closet or a very good office.
Remove shelves and the hanging bar. Use putty to fill any holes that are left behind. Sand the rough spots left by the putty once it has dried, and cover over the spots with the appropriate color paint.
Place a small desk into the closet. It's best to put it in the center of the closet so you aren't cramped on either side and have room for other small office items.
Add additional office supplies if you wish. Items might include a laptop or desktop computer, a printer, waste basket, filing cabinet and paper shredder. The pieces you choose will largely depend on the size of the closet and your individual needs.