A Newark police detective investigating a group believed to have illegal guns Friday night was shot to death before he could get out of his vehicle and a second officer was wounded, authorities said.