Previous studies suggest that urbanization alters the abundance and species richness of native insects on remnant habitat patches. However, the effects of urbanization on biological communities caused by habitat loss and fragmentation have not been separated from effects caused by altered habitat quality within remnant habitats or by the nature of the urban matrix. To test for an effect of urbanization acting via altered habitat quality or matrix characteristics, we controlled for the effects of habitat loss and fragmentation by comparing remnant habitat patches in urban and agricultural regions experiencing similar levels of habitat loss and fragmentation. We studied the species richness and abundance of the community of leaf-mining Lepidoptera on Quercus agrifolia in the San Francisco Bay Area. We measured the extent of five land-use types within a 500 m radius of each study patch. We built generalized linear models to determine if the extent of any of the landscape variables was associated with the species richness and abundance of the leaf-miner community. The extent of urbanization was not associated with species richness or total abundance. However, the abundance of three species of leaf-mining moths was associated with the extent of urbanization, but not in a consistent pattern. The abundances of Stigmella variella and Bucculatrix albertiella were higher and the abundance of Dryseriocrania auricyanea was lower at highly urbanized sites. The absence of a consistent association between urban land-use and both species richness and abundance indicates that the effects of urbanization on the community of leaf-mining moths of Q. agrifolia do not differ from the effects of replacing and fragmenting habitats with similar amounts of agricultural land-uses.