The short answer is, it could be disintegrated with a 1 gigaton hydrogen bomb - but not likely to get that ready in time with just a few months warning. That does of course result in lots of smaller asteroids - but many would burn up in the atmosphere, and others would miss Earth, and the ones that were left would probably have less impact than the original big hit. So that is something that could be done. You'd have to weigh up the benefits, also depends on whether technically feasible to get it together at such short notice.
But very unlikely to happen with such short notice.
There's a 1 in a million chance of getting hit by something so large in the next 20 years. and by then we'd have the Near Earth Asteroids mapped out so thoroughly that such a large asteroid hit would probably be known about decades in advance.
We have mapped out 90% of the NEO population of 1 km size, and find a new one every month, expect to get to 99% by the 2020s - this part of the NEO search is going really well - it's the smaller 100 meter ones that are tough to find. That leaves the ones that are currently way beyond Jupiter still to find after that. Most of the population is thought to be inside of Jupiter.
And a rock of 1 km in diameter would have mainly local effects, so you could also evacuate the part of the world that it is due to hit.
In the remote chance that we have only a few months notice, right now, that's almost certainly what we'd need to do.
But it's not worth sinking large sums of money into constructing methods for disintegrating 1 km asteroids with a few months notice.
Far better use of our money right now to map the potential impacts thoroughly so we'll have decades, or centuries of warning first.
As for moving it - we'd have to change its velocity by about 1000 km a month, so about 1.38 km / hour. It's much easier to do if you have a longer period of warning - which is why it is so important to detect them. If we had a decade of warning, then it is a tenth of that, 138 meters per hour change in velocity. And if it does a flyby of Earth first before it hits - very likely as Earth is such a tiny target, then it's just perhaps 200 meters in a decade if detected a decade before the flyby, to avoid the gravitational keyhole for its first encounter with Earth.
So that then becomes just 20 meters a year, or about 2 cms an hour delta v.
So much easier to deal with with lots of advance warning.
Then it is also very unlikely that the first accurate impact prediction we get is of a 1 km asteroid. The first few impact predictions are almost certain to be tiny things from 10s of meters up to 100 meters or so, as there are so many of those.
So we can learn how to deflect those first, and in natural course of events work up to the larger ones, which are also easy to deflect if you catch them at least one close flyby in advance. I think it makes most sense to develop capabilities on demand like this - given that it is hard to get funding, so funding is best used for detecting the asteroids. While if we have an already detected asteroid headed for Earth, most likely a couple of decades into the future after a thorough search like that - it would surely be much easier to get funding to deflect it. And different asteroids would need different deflection methods, so whatever you develop might not be what you need for the first asteroid you need to deflect, unless you develop ways to deflect them all - you could do that with lots of funding.
In detail:
First, this is a low probability event. Far more likely to be hit by smaller asteroids, so expect those more likely as first successful predictions.
Also the Earth is a tiny target, so if we do find a 1 km asteroid headed our way with only a few months notice, chance is very high that it misses Earth as we work out the trajectory more accurately.
And if it misses Earth, it probably does many flybys before it hits, and those near flybys give us lots of opportunities to deflect it with a small amount of delta v, less than 1 meter per second.
Still, it's not impossible, there's a one in a million chance that it could happen in the next couple of decades, and one in two thousand chance of it happening this century (happens every 200,000 years on average).
So let's look at the effects, as one thing we could do is to just evacuate the impact zone as far as possible.
See Environmental Damage from Asteroid and Comet Impacts
So - at this size we definitely need to deflect it if we can.
And it's possible - an asteroid impact is about the only natural disaster that we can prevent totally (unlike Earthquakes, volcanic eruptions, tsunami from earthquakes etc)
But we don't really have anything that is ready to hand to deflect something this large this quickly.
Russians and Americans experts together came up with a plan for large nuclear weapons (up to 1 gigaton) which could vaporize a 1 km asteroid and deflect a larger asteroid if you can do it less than ten years before the impact. A new use for nuclear weapons: hunting rogue asteroids
"These Earth-defending missiles, he said in an interview, could be launched years in advance or even on short warning, although a later defense increases the likelihood that large chunks of radioactive debris will rain onto the planet’s surface. Wie argues that, even in this case, smaller pieces would burn up in the atmosphere and strikes by the remaining rocks would be less damaging than a direct hit by an intact asteroid.
"The next logical step, Wie says, would be to test his plan by launching a missile and dummy warhead to strike an asteroid, at a cost of around $500 million, to see if his two-stage design could work. But so far this is just a concept."
See also Russia, U.S. Eye Team-up to Build Massive Nuke to Save Planet from an Asteroid
If you do it early, then most of those rocks would miss the Earth because they end up on different orbits than the original asteroid. Even if you do it quite late, like a few months before, you'd still get many of them miss the Earth.
But we'd need a longer timeline than just a few months to build this nuclear weapon, and fly it into space. And you'd want to test it surely first.
For more about this, see my answer to: Is the act of drilling into an Earth-bound asteroid to blow it up with a nuclear weapon (as seen in Armageddon) technically feasible? If so, how much would it cost and how many nukes would you
need?
So - I think evacuating the impact zone would be the best thing to do right now.
Try to build that rocket and bomb if you think it has any chance of being completed in time, you'd ask the experts. But it seems rather too short a period to get it designed, completed and launched.
So, we may seem a bit vulnerable. But remember this is a very unlikely one in a million probability.
So - I don't think that means that we should go all out and design a way of deflecting a 1 km asteroid right now.
If you've got enough budget available to do that, you could spend it more productively by investing in the project to map out all the Near Earth Asteroids by the late 2020s.
Or indeed, if really keen, willing to spend billions on a high budget project right away, you could map them all out sooner than that, maybe even by 2020.
Once we've got them all or nearly all mapped out, then we will be able to detect 1 km asteroids decades in advance, and so will be able to deflect them easily, so more or less get rid of the chance of this happening at far less cost and with less risky and gentler way of dealing with the issue.
There'd still be a chance of impactors from the Jupiter family comets, but they'd be more expensive to map out, and only 10% of the risk estimated, so start with the NEAs. Once those are all mapped out we will have better technology anyway and can look into possibilities of mapping all the Jupiter family objects down to sub 1 km radius as well.
For the effects of larger meteorites, see Environmental Damage from Asteroid and Comet Impacts. Also Solar System Fluff . From 1 to 10 km then they are large enough to be devastating world wide and the larger ones cause mass extinctions (but not extinction causing for humans with our technology, many creatures such as turtles survived the dinosaur extinctions, and we could also with technology).
World ending not going to happen, nothing that big for billions of years, probability about zero. For more about that, see Robert Walker's answer to What are the odds of a bigtime asteroid hitting the Earth a la Armageddon and Deep Impact?
See also my answers to:
And I've now written a booklet about giant impacts, available on kindle, or you can read it free on Science20.
Giant Asteroid Headed Your Way? - How We Can Detect And Deflect Them