It sounded an interesting question, so I looked it up. The reason I asked about the tax years is because it matters.
If the bonus was paid, and then returned in the same year - it should not appear on your W2 at all, and your taxes would be calculated accordingly. You might end up with overpayment of FICA taxes, but you can get that credited on your tax return.
If, however, the repayment is not in the same year as the payment, it becomes more complicated. The code section that deals with it is 26 USC § 1341. What it says, in short, is this: you can deduct the repaid amount from your current taxable income, but only if its more than $3000. The tax benefit of such deduction cannot exceed the actual tax paid on this in the year when you got the bonus (i.e.: you need to calculate that year with the amount, and without the amount - the credit cannot exceed the difference). But it can also not exceed the amount you would be paying on that amount in the current year (i.e.: if current taxes are less than that year - you lost the difference).
If the signing bonus is less than $3000 and it spans across tax years - you cannot deduct it. Bummer.