Thank you Jasmeen. You will have to check his stools to determine if it he is trying to poop all the time because he is constipated or he has intestinal inflammation or "colitis."
He may be trying to poop all the time because he is constipated. This means the stools are hard, small, or dry. This makes them difficult to pass and get out.
To help with constipation you can buy some plain metamucil. Mix a tablespoon, if he is a large breed dog and a teaspoon if she is a small breed dog (under 30 pounds), of the metamucil with the favorite food once a day.
There is also an over the counter product for hairballs called "laxatone." It does help prevent, and resolve, hairballs but it can also help with constipation. Try 1/2 inch to 1 inch strip once a day.
If your dog will eat it, you can also try canned plain pumpkin. It is high in fiber. Give a tablespoon of that once a day with food.
You can purchase a stool softener at the drug store called "docusate sodium." You can give 50 mg by mouth per day as needed.
I do not recommend trying to do an enema yourself at home. It can be dangerous for your dog.
If these remedies do not work, there is a veterinary prescription medication called "lactulose." This is a liquid that is given 2-3 times a day by mouth for constipation. It is quite effective.
There are also foods called "low residue." These are foods that are more digestible which means there is less stool to come out. "Iams low residue" is a popular one.
Try to encourage water intake as well. The more water he drinks, the less likely he will have hard stools. You can add water to his food or a little low sodium chicken broth. Canned food has a higher moisture content then dry food. If he is not used to canned food, change him over very gradually or he will get diarrhea.
Metabolic disease such as kidney disease, adrenal gland disease, liver disease, and diabetes can cause chronic dehydration. These conditions can lead to constipation as well. Metabolic disease have to be diagnosed with blood work.
If he has colitis, he has inflammation of the large intestines. This can be caused by a bacterial infection or a parasitic infection other than worms. I know you already dewormed him. Again metabolic disease such as liver disease can cause chronic colitis/diarrhea as well. When the colon is inflamed, the dog feels like they have to go even when there are no feces to come out. So they posture and strain to go all the time. The first thing to do would be to have a fecal sample checked for abnormal bacteria and parasites. Both conditions can be treated with oral medication. You can try giving him human immodium ad. This will help stop the straining but will not cure the underlying condition. You can also try feeding a bland diet of plain cooked chicken and plain white rice. This is easier to digest.
But first of all you need to figure out if he is constipated (hard stools) or having diarrhea (colitis)
I hope this helps.