Great to have a question on here about an excellent manager!
So, you know you need to speak up. You also have several things to decide.
- Written, or verbal communication? Verbal's less formal, but it could be useful to have it on record. If your content is purely professional, and you're not talking about rumours, written could be the way to go - if you want to discretely bring up the gossip, don't do it in writing.
- Just you, or a group effort? If everyone on your team agrees that this person is great, they might all chip in. (Well done for stepping up, by the way.)
- Do you address the firing rumours, or just do an unsolicited recommendation?
These all have their advantages and disadvantages, and we can't really tell you which is best without knowing your relationships with the other people in your company.
However, you can't go wrong with an email to one of the higher-ups to give a recommendation about your boss. It doesn't have to formal, just something to say that she's bloody good at her job:
"Hello, I just wanted to give you an update from our office! We're
still struggling with the project, but we've really appreciated the
new team member - she's accomplished X, Y and Z. We're looking at
moving on to solving problems J and K, and are all glad she's here to
lead us."
This is the "tamest" approach - you're speaking up and saying she's doing a good job. On the flip side, the concern may be that they won't take it seriously and just pass it off - and you can't really get them to take it seriously (i.e. "This person leaving will negatively affect everyone") without telling them about the rumours you've heard. Unfortunately, this then goes into discussing rumours and hearsay in the office, which is usually a no-no (your bosses may think everyone is gossiping, and also that you're telling them how to do their job). This is a call you'll have to make - leave it at telling them how good the team is with her, or step over into saying how bad it will be without her.
Other problems
Also, the potential firing aside, it sounds like the company has some problems, and certainly that decisions have been made that you don't agree with. These have all added up, negatively impacted the project, and put your new manager's role at risk. I would take some time to have a think about whether you can bring these issues up to prevent them from reoccurring or do anything about the current state of affairs. It sounds like she was put on a sinking ship and is managing to keep it afloat, even if it's not coasting along nicely - you may be able to influence whether or not she stays captain, but if the boat's still sinking, that's not much use.
I would, at the very least, put in a good word for her, which it sounds like you're quite willing to do. All the best.