The local magnetostriction measurement has become an emerging issue because strain-mediated nanocomposites have received considerable attention due to their potential applications for high sensitivity sensors and high density energy harvesters. Compared to many instruments capable of measuring nanometric magnetic domains, techniques for measuring local magnetostriction have been rarely reported. Here, we introduce a local magnetostriction measurement method by modifying an atomic force microscope (AFM) by combing a solenoid to apply an external ac magnetic field and induce magnetostrictive excitation. The distribution of magnetostrictive response is mapped by contact mode AFM and lock-in detection techniques with a few nanometer lateral resolution. We have found that a few micrometer-size domains of a cobalt film showing different amplitude and phase signals of the magnetostrictive response are observed by the second-harmonic response of the ac magnetic field frequency, which is not detected in a linear response signal. We suggest that the phase and amplitude signals observed in each domain are related to magnetic-easy-axis directions. Our findings provide a unique pathway to understand the local magnetostrictive response based on scanning probe microscopy. (c) 2018 Author(s).