Police said the men were thought to have been drinking in the Log Cabin pub in Baillieston, in the east end of Glasgow, last night.
The 22-year-old victim left the pub on Bredisholm Road and was seriously assaulted on nearby Ravenswood Road, next to Morrisons supermarket car park, at around 12.50am this morning.
He was taken to Glasgow Royal Infirmary with serious head injuries. Medical staff describe his condition as serious but stable.
There are no descriptions as yet of the men who carried out the attack.
Detectives are treating the incident as attempted murder, and are reviewing all available CCTV footage and carrying out door-to-door inquiries in the area.
Detective Inspector David Mackie, of Shettleston CID, is appealing for anyone with information to come forward.
He said: "This was a horrendous attack which has left a young man in a serious condition in hospital.
"Our inquiries are at a relatively early stage, however we understand that there had been an altercation earlier in the evening outside the Log Cabin public house on Bredisholm Road between the victim and the men believed to be involved in the attack.
"Due to the severity of his injuries we have as yet been unable to speak to the victim, however we do believe that this was a targeted attack.
"The area in which the attack took place is heavily populated with business premises and residential premises, and I would like to appeal to anyone who may have been in the area to get in touch with police."