For a simpler example than Chris's, consider the map from the (2-dimensional) torus to a sphere that collapses the 1-skeleton of the usual CW complex and takes the 2-cell to the 2-cell of the sphere.  The torus is $K(1, \mathbb{Z}^2)$, so this necessarily gives zero maps on homotopy, but it's also pretty clearly not null-homotopic.