It's very hard to act in a way befitting one's reputation.

Literal

Fame [to-に] not-shame [so-that-ように] act [nominalizer-の] [topic-は] very difficult.

名声に恥じない = 'not ashamed [before] fame' → 'worthy of / befitting one's reputation.' 恥じる ('to be ashamed') takes に for what one is ashamed before. The ~ないように ('so as not to X') marks a purpose. A reflective statement about the burden of living up to expectations.