Characters are your own creative material, and unless the DM has made you sign some unusual intellectual property rights waiver, the character is yours to use and re-use as you see fit. (hint: Don't sign weird intellectual property rights waivers, no matter how good the DM is)
The real question is - are there any situations where a DM will refuse to let you use that character in their campaign?
I can think of a few.
Level
Your character might be too high or (rarely) too low level for the DM's campaign. This is usually very easy to modify though - just bring their build down (or up) to the level appropriate for the campaign, and for most DMs that'll be good enough.
Background
Your character might have an elaborate background that, while perfectly reasonable in your previous DM's campaign, doesn't fit well with the new DM's campaign setting. This may require some rewriting or, in extreme cases, changing some key elements of the character. You can usually talk about this with the DM to figure out what needs to be changed, or if you can re-write the background of your character to better suit the campaign setting.
Tone
This is a little more subtle to detect, but some DMs prefer a more lighthearted take on role-playing, while others prefer a dramatic or even horrific storyline, and if your character isn't matched to the tone of the campaign, they might not fit. Worse, they could even derail the campaign. Talk it out with your DM, see if they fit the tone and if they don't, consider whether your character would survive a re-write to fit the tone.
House Rules
Make sure there aren't any essential house-rules from your previous campaign that made your character 'work', or that the new DM doesn't implement any house rules that would break your character or make them useless to the campaign - if either of these are true, you can still save the character, but it could require a considerable rebuild.
Game System
This is one where there's sometimes not much you can do to help it. If you've got a favorite character from one system that you're trying to transfer into a totally different system, sometimes the two clash so sharply that there's no hope to save any of your character's traits. On the other hand, sometimes re-writing a character to fit into a new system can be an interesting challenge. Talk it up with your DM, and see if there's any way you can make it happen.
The common thread here is that there are barriers to getting an old character into a new campaign - however, all of them can be overcome, with the help of a DM who's willing to take on the character.
However, don't assume the DM is willing. Sometimes they aren't, or sometimes they just want brand new characters because that's how they prefer their campaigns. The only sure way to find out is to bring it up to the DM yourself.