Due to the electromechanical coupling effect, composition-graded InGaN nanowires (NWs) have promising potential application in piezotronics. However, as an inhomogeneous system at the nanoscale, the electromechanical response of InGaN NWs can be affected by some small-scale effects, e.g. the flexoelectric effect, which is almost unexplored. In this paper, the piezoelectric and elastic properties of composition-graded InGaN NWs are investigated by using molecular dynamics (MD) simulations, in which a power-law formula is introduced to describe the continuously varied composition in graded InGaN NWs. MD results show that the diameter, Young's modulus and piezoelectric coefficient of graded InGaN NWs are dependent on the position of NWs. Moreover, the distribution of these structural and material parameters can be efficiently modified by changing the power-law exponent. The position-dependent diameter and Young's modulus can be well described by Vegard's law. However, as for the piezoelectric coefficient, a big discrepancy is observed between the results extracted from MD simulations and Vegard's law. This discrepancy is attributed to the enhanced piezoelectricity in graded InGaN NWs induced by the flexoelectric effect. The flexoelectric effect is found to originate from the non-uniform strain in graded InGaN NWs majorly induced by the varied Young's modulus along the NW axis, which becomes more significant as the length of NWs decreases. This work tries to present a comprehensive understanding of the electromechanical coupling of InGaN NWs, which can provide guidance for the design of graded InGaN NWs-based piezotronic nanodevices.