Get Your Dog Care Questions Answered by Experts
It sure sounds like he isn't feeling well at all which could be from a number of things ranging from a tick carried disease to arthritis.
It is also possible he was frightened by something outside and so is reluctant to go out.
You can see if putting his leash on and taking him out a different door than usual makes a change in his willingness to go out. That would give you an idea if he is fearful of going out the usual way for some reason. I've seen dogs who have had a seizure be frightened of the area the seizure happened for example or dogs who were stung or somehow shocked fearful of going out a door too.
If your dog might have gotten into anything toxic, appears dehydrated (see if a pinch of skin over the shoulder blade stays stuck in a tent form or flows back down normally when released), has a rectal temp over 103.5F (normal is 100.5-102.5f), has gums or tongue that look white, blue, gray or yellow tinted where they are normally pink, has a slow color refill if you press on a pink area of gum or tongue, or is becoming lethargic and non responsive to you then you may want to get the dog in to see a vet right away.
I do think a vet visit is a good idea as there are so many things that might be impacting him that only an in person check up and perhaps some testing can detect.
Hope this helps you!