We prove that every simple connected graph with no K5 minor admits a proper 4-coloring such that the neighborhood of each vertex v having more than one neighbor is not monochromatic, unless the graph is isomorphic to the cycle of length 5. This generalizes the result on planar graphs by S.-J. Kim, W.-J. Park and the second author