A member of the public found the Staffordshire bull terrier cross-breed when they opened the bin on King's Road, Portobello, Edinburgh, to put in some rubbish on January 1.
It is thought that Nico may have been in the large black wheelie bin for up to an hour.
The Scottish SPCA identified the owner and the dog was returned home unharmed.
The charity has appealed for information about the incident.
Chief inspector Paul Anderson said: "Thankfully the dog hadn't sustained any injuries and we were able to identify the owner and return him home.
"His owner was understandably horrified and we are very keen to hear from anyone who may have witnessed this incident.
"We are asking people in the area to cast their minds back to New Year's Day and to call our animal helpline on 03000 999 999 if they remember seeing the dog, or anyone acting suspiciously."