the last minute
The phrase "the last minute" is a common way of describing doing something just before the deadline. Of course, it doesn't literally mean the last minute before the deadline. In the case of the assignment described at the top of this post, "the last minute" means two days before the assignment is due.
If you really want to emphasize how close to the deadline you are, use "very" before "last minute":
I waited until the very last minute to turn it in.
Follow PhraseMix