XP depends on how much damage you did to killing an enemy.
If you only did 50% of the damage, you only get 50% of the XP for the kill.
Your summons and creature of course count as 'damage you do'.

But because in this case the Goblin was charmed, he received damage from the other goblins. Thus the XP gets shared between you and the goblins that hurt your charmed goblin.