The idiom burning the midnight oil can be traced back at least to 17th century England, and means to work on a project or endeavor through the overnight hours. Before the invention of the electric light, most lamps used for illumination were fueled by oil. These lamps were customarily extinguished during the early evening hours as most people prepared for bedtime. Those who worked late into the evening would literally be burning the oil late at night.
An English author named Frances Quarles referred to burning the midnight oil in a book called Emblemes, published in 1635. Quarles writes about "mid-day sweat or mid-night oyle" when referring to the human trait of working too hard. Working by the light of a candle or oil lamp was not considered an unusual activity during Quarle's time. Many people preferred to work during the quieter overnight hours, although most oil lamps were incapable of producing a substantial amount of light.
In a modern sense, the idiom is largely symbolic, since few people voluntarily work by the light of an oil lamp today. An employee working on a tight deadline or a project team preparing for an important presentation may "burn the midnight oil" by staying in the office after hours or working throughout the night at home. This may be the only way to meet a specific deadline or devote more time to a project without any distractions.
The expression is generally considered a positive one, implying a person's dedication to getting a project done in a timely fashion regardless of the personal sacrifice. Attorneys working on a difficult court case or physicians working on a complicated diagnosis, for example, would be considered very dedicated if they were burning the midnight oil at work. It is often seen as an honorable sacrifice of personal time for a much greater or larger professional cause.
Parents of newborns may also be said to be burning the midnight oil with late night feedings and changings. Legislators working out the details of a new bill may also do so during special overnight work sessions. Students facing an impending deadline for a research or term paper often find themselves working into the night before the assignment is due. Fortunately for procrastinators and overachievers alike, burning the midnight oil in order to complete a task is almost always a viable option.