Firefighters responded to 24-07 East 23rd Street in Sheepshead Bay, where the man was buried up to his chest for about 15 minutes.
He was pulled out on a stretcher and was seen attempting to talk with firefighters.
The man, in his early 30's, has been taken to Kings County Hospital, where he is in serious but stable condition.
It is still unclear how he became trapped.
The hole is believed to have been about eight feet deep.
It was located between a garage and the backyard of a house.
Buildings Department records show a permit was recently issued to convert the two-story building's first floor into a commercial space and extend the back. Records also show a complaint about Monday's incident, saying the victim was a worker.
A man who answered the construction company's phone said he believed it was a minor accident. He hung up before giving his name.