Pop princess Spears, 39, has been in the headlines in the last few months months over her situation, which she recently described as "abusive" in court testimony.
Parton, 75, was asked about the legal battle when she appeared on the show Watch What Happens Live with Andy Cohen this week, and revealed that she could relate.
"Well, I try to not get involved in other people's business,” said the 75-year-old. “I think she is a wonderful artist and I think she's a wonderful girl. I only wish her the best.
"And I understand all those crazy things."
— WWHL (@BravoWWHL) July 30, 2021
She went on: "I went through a lot of that myself through a big lawsuit in my early days with Porter Wagoner trying to get out on my own.
"So I understand where she is coming from and how she feels.”
The star said that she hopes “that all turns out the way that it should”.
Parton used to be in a duo with singer Wagoner before deciding she wanted to branch out on her own and go for a solo career.
In 1979 he filed a $3 million (£2.1 million) breach of contract lawsuit against her.
The suit was later settled out of court and Parton has previously indicated that she could have paid him a million dollars.
Watch: Britney Spears is feeling 'rebellious' and 'spontaneous'