Wood borers and bark beetles are among the most serious forest pests worldwide. Many such species have become successful invaders, often causing substantial, costly damages to forests. Here we design and evaluate the cost-efficiency of a trap-based surveillance program for early detection of wood borers and bark beetles at risk of establishing in New Zealand. Although costly, a surveillance program could lead to earlier detection of newly established forest pests, thereby increasing the likelihood of successful eradication and reducing control costs and damages from future invasions. We develop a mechanistic bioeconomic model that relates surveillance intensity (i.e., trap density) and invasion size to probabilities of detection and control. It captures the dynamics of invasive species establishment, spread, and damages to urban and plantation forests. We employ the model to design surveillance programs that provide the greatest net present benefits. Our findings suggest that implementing a surveillance trapping program for invasive wood borers and bark beetles would provide positive net benefits under all scenarios considered. The economically optimal trapping strategy calls for a very high investment in surveillance: about 10 000 traps in each year of the 30-year surveillance program, at a present value cost of US$54 million. This strategy provides a 39% reduction in costs compared with no surveillance, corresponding to an expected net present benefit of approximately US$300 million. Although surveillance may provide the greatest net benefits when implemented at relatively high levels, our findings also show that even low levels of surveillance are worthwhile: the economic benefits from surveillance more than offset the rising costs associated with increasing trapping density. Our results also show that the cost-efficiency of surveillance varies across target regions because of differences in pest introduction and damage accumulation rates across locales, with greater surveillance warranted in areas closer to at-risk, high-value resources and in areas that receive more imported goods that serve as an invasion pathway.