She sang a beautiful song with all her heart.

Literal

She [topic-は] heart [object-を] putting-in beautiful song [object-を] sang.

心をこめて (こころをこめて, 'putting one's heart in, with all one's heart') is a set adverbial expression using the te-form of 込める ('to put into, to concentrate'). It describes doing something with genuine feeling and care. The を marks 心 as what's being invested into the action.