In the first Ayah, Allah the Almighty says: Do not kill your children because of poverty; We provide sustenance for you and for them) [Al-An’am 6: 151] i.e. you are already poor, and you fear having no sustenance by which to feed your children so you kill them, but Allah assures you that He will provide for you and then for them.
In the second Ayah: (Do not kill your children for fear of poverty. We provide for them and for you. Surely killing them is a heinous sin.) [Al-Israa’ 17:31]
You are not poor, but you kill your children for fear that they may eat up your wealth, and you therefore may become poor. So Allah Almighty assures you that He will provide for them (first) and so they will not eat up your wealth, and then provide you.
قال الله سبحانه وتعالى في سورة الأنعام: (وَلَا تَقْتُلُوا أَوْلَادَكُمْ مِنْ إِمْلَاقٍ نَحْنُ نَرْزُقُكُمْ وَإِيَّاهُمْ) ]الأنعام 6: 151
مِنْ إِمْلَاقٍ: تدل على وجود الإملاق و هو الفقر لذلك قدم الآباء
وقال سبحانه في سورة الإسراء: (وَلَا تَقْتُلُوا أَوْلَادَكُمْ خَشْيَةَ إِمْلَاقٍ نَحْنُ نَرْزُقُهُمْ وَإِيَّاكُمْ إِنَّ قَتْلَهُمْ كَانَ خِطْئًا كَبِيرًا) ]الإسراء 17: 31
خَشْيَةَ : تدل على أنه لم يقع لكن يخشى من وقوعه فقدم الأبناء .