Will Allah punish someone for lying, even after he tells the truth?
If you have told a lie to someone and then apologized to him/her by telling the truth then obviously this means you have repented and Allah indeed likes repentance. Allaah accepts repentance and is Merciful. He calls sinners to repent so that He might forgive them:
“But whosoever repents after his crime and does righteous good deeds (by obeying Allaah), then verily, Allaah will pardon him (accept his repentance). Verily, Allaah is Oft-Forgiving, Most Merciful" [al-Maa’idah 5:39]
Also in Surah Al-Nisaa; 4:17-18
“Allaah accepts only the repentance of those who do evil in ignorance and foolishness and repent soon afterwards; it is they whom Allaah will forgive and Allaah is Ever All-Knower, All-Wise. And of no effect is the repentance of those who continue to do evil deeds until death faces one of them and he says: ‘Now I repent;’ nor of those who die while they are disbelievers. For them We have prepared a painful torment”
Allaah is Kind to His slaves and loves those who repent. He accepts their repentance, as Allaah says:
“Truly, Allaah loves those who turn unto Him in repentance and loves those who purify themselves” [al-Baqarah 2:222]