Baking soda, borax and oxygen-based bleach make excellent alternatives to laundry detergent. Baking soda is inexpensive and is excellent for cleaning clothes. The easiest method is adding 1 cup of baking soda to the wash water.
If there is only a little bit of detergent left in the bottle but not enough for a whole load, it can be supplemented by adding 1/2 cup of borax or 1/2 cup baking soda to the wash water, followed by the remaining detergent.
Another alternative is to fill the empty detergent bottle with water, shake it around, and pour a cap full to the washer. About.com advises that detergent should never be replaced with dishwashing soap or detergent, household cleaner, bubble bath, shampoo or ammonia.