When you're under 70 1/2, the only time you have to worry about taking required minimum distributions (RMDs) from an IRA is when you've inherited it. Even then, if you inherited it from your spouse, are the sole beneficiary and have unlimited withdrawal rights, you can choose to treat the IRA as if it were your own. If you do, the IRA is treated like you were always the owner, so you still won't have to take RMDs until at least you're 70 1/2. If not, you generally have two options: either distribute the entire amount by the end of the fifth year after the decedent died, or take annual distributions each year until you've emptied the account.
Once you've taken the money out of your inherited IRA, it doesn't matter what you do with it, including giving it to charity. The IRS does not impose any requirements on how you spend the money from required minimum distributions, just that you take out the money from the IRA. So, whether you give the money to charity or buy yourself a new car, the distribution still counts toward your RMD.
When you donate your RMD to charity, it counts as two separate transactions for tax purposes. One, it's a distribution from your IRA, which must be noted on your tax return and may be taxable income, depending on the type of IRA. Two, it's a donation to charity, which qualifies you to write it off if you itemize your deduction. If your itemized deductions, including the donation, don't exceed your standard deduction, you can't claim the donation as a deduction. So, even though you might still have to include the withdrawal in your taxes, you won't get a write-off for the deduction.
Whether your RMD is taxable or not depends on the type of IRA you inherited. Traditional IRA RMDs are fully taxable, except the portion of each withdrawal that comes from nondeductible contributions (if any). Roth IRA RMDs are completely tax-free as long as the decedent had the Roth IRA for at least five years before his death. If the Roth IRA was less than five years old, the contributions come out tax-free, but the earnings are taxable income. The taxability of the RMD doesn't affect your charity deduction, however. For example, even if your Roth IRA RMD is totally tax-free, you can still write off your donation.
Qualified Charitable Distributions
Qualified charitable distributions (QCDs) are a special withdrawal where the money is transferred directly from your IRA to the charity by the bank — you never touch it. An advantage here is that the donation counts as your RMD but you don't have to include it in your taxable income (and you don't deduct it as a charitable contribution), so you don't have to give up your standard deduction. Unfortunately, you must be at least 70 1/2 years old to be eligible to use QCDs.