She kept the secret close to her heart.

Literal

She [topic-は] that secret [object-を] chest [in-に] kept-hidden-left-it.

胸に秘める ('to keep hidden in one's heart') frames a secret as something held inside, with 胸 ('chest, heart') as the seat of emotion. The ~ておく adds the deliberate-state-maintenance flavor: the secret is being kept that way intentionally. 胸 in Japanese figurative usage covers what English splits between 'chest' and 'heart' for the seat of emotion — feelings, secrets, and unspoken thoughts all live there. The variant 胸ひとつに秘める adds an 'alone' intensifier (literally 'in just one chest') to underline solitary withholding.