The male reacted by slapping the gun away from one of the assailants and running into the house, located off Washington Boulevard in George Town, police said.
The gunmen fled the scene. One vehicle is in police custody, according to the Royal Cayman Islands Police Service.
The incident was reported to authorities at 1.18am on Sunday.
The men were described as wearing full black clothing and coverings over their faces, police said. No further description was available.
No shots were fired. No injuries were reported.
The matter remains under investigation by the RCIPS Criminal Investigation Department.