Yes, ZIP code 10040 is located within Manhattan—one of New York City's five boroughs. Specifically, it covers the Inwood neighborhood at Manhattan's northern tip, bounded approximately by the Harlem River (north/east), Hudson River (west), and Dyckman Street (south).
Inwood is Manhattan's northernmost neighborhood, known for:
NYC's five boroughs—Manhattan, Brooklyn, Queens, The Bronx, Staten Island—each contain numerous ZIP codes. Manhattan's ZIPs generally start with 100xx (10001-10282). 10040 falls squarely in this range, confirming its Manhattan location.
Adjacent ZIP 10034 (Marble Hill) is politically Manhattan but physically on the Bronx mainland—a geographic quirk from the Harlem River Ship Canal's construction (1895).