Peace be on you.
God was serious.
It was symbolic massage.
Hazrat Ibrahim (a.s.) had already fullfiled it by leaving the son and wife in wilderness. That is why it was said:
[37:106] ‘Thou hast indeed fulfilled the dream.’ Thus indeed do We reward those who do good.
Please see note 3338
Ref:
http://www.alislam.org/quran/tafseer/?page=2230®ion=E1&CR=EN,E2
It is somewhat like اقتلوا انفسكم (lit: Kill yourself) but it means Kill your mean desires.
So Allah the Exalted was serious and Hazrat Ibrahim a.s did not lie, since he was very highly obedient, he inclined toward literal meaning which he was promptly stopped to act upon.