The incident occurred at Merriman Court shortly after 10.00pm in the Ballymagroarty area of Derry.
The house was occupied at the time by a woman and her children.
The men left after being told a man they asked for by name was not in the house.
No shots were fired and no one was injured in the incident.
A PSNI spokesman said the men were wearing dark hooded tops and ran off afterwards.
He added a motive had not been established “at this stage.”
He said police at Strand Road are keen to hear from anyone who saw the two men, or vehicles, in the area.
He added: “Anyone with information is asked to call police on the 101 non-emergency number, or contact Crimestoppers anonymously on 0800 555 111.”