At first glance, there seems to be little reason to use Magnezone in OU. It's slow, has crippling weaknesses to common attacking types, and it faces stiff competition from other, better Electric-type options available, such as Thundurus. However, luckily for Magnezone, magnets are magnetic. Its signature ability, Magnet Pull, gives it the excellent niche of being able to trap and remove many common Steel-types, making it a good partner for certain sweepers, such as Mega Pinsir or Dragonite. It also has a whopping 11 resistances and 1 immunity, the most of any Pokemon in the game. However, at the end of the day, Magnezone is still a rather niche option, and it can struggle to be very effective outside of its niche, which is shrinking more and more by the generation.
name: Choice Specs
move 1: Volt Switch
move 2: Hidden Power Fire
move 3: Flash Cannon
move 4: Thunderbolt
ability: Magnet Pull
item: Choice Specs
evs: 172 HP / 252 SpA / 84 Spe
Volt Switch gains tons of momentum, especially against opposing Steel-types, and can help it escape from revenge killers. Hidden Power Fire is used in the second slot as it OHKOes Scizor and Ferrothorn, both of which are very important for Magnezone to trap. Thunderbolt is used in the last slot for consistent secondary STAB that does not force Magnezone out, but it should not be used very often, as Pokemon locked into an Electric-type move are very easily exploited by common Ground-types, such as Excadrill.
Maximum Special Attack investment is used to make the most of Magnezone's great base 130 Special Attack. The listed Speed EVs let it outspeed minimum Speed Skarmory. The rest of EVs go into HP for more survivability. 144 Speed EVs can be used to outspeed minimum Speed Heatran, but beware that Heatran commonly runs Speed investment and can hit Magnezone much harder than it can hit back. Because of this, it is generally a better idea to use the given spread rather than to try and trap Heatran, which is risky. Choice Specs is the main item, as without it, Magnezone lacks the power to deal with many key threats.
The main goal of this set is to trap and eliminate opposing Steel-types that are causing trouble by walling its teammates. Magnezone is most effective at trapping Skarmory, Scizor, Ferrothorn, and Klefki, but it can occasionally trap Jirachi and Heatran as well. Because Ground-types love to switch into Magnezone, locking yourself into Volt Switch or Thunderbolt isn't often a good idea if the opponent has a Ground-type. However, this problem can be somewhat dealt with by good prediction, as most Ground-types hate switching into Magnezone's other moves. For example, Excadrill has a small chance of being OHKOed by Hidden Power Fire on the switch. Similarly, Flash Cannon has a chance of OHKOing Landorus-T and Gliscor on the switch after Stealth Rock. As this set's main targets are Steel-types, they are the Pokemon Magnezone should be switching in on most often. Ferrothorn and Skarmory in particular cannot touch Magnezone and are swiftly eliminated by it. Magnezone also outspeeds and OHKOes Scizor, but it must be wary of switching into Superpower.
Any Pokemon that needs certain Steel-types to be removed in order to sweep, such as Dragon Dance Dragonite, Swords Dance Mega Pinsir, or Calm Mind Clefable, makes a good partner for Magnezone. Teams that have trouble breaking through bulky Steel-types such as Skarmory or Ferrothorn as a whole also benefit from Magnezone as a teammate. Pokemon that can beat the bulky Ground-types that love to switch in on Magnezone, such as Rotom-W, Azumarill, or Manaphy, make good partners for it.
A set with Analytic instead of Magnet Pull is usable as it lets Magnezone hit insanely hard with Choice Specs, but Magnezone is rather outclassed outside of trapping Steel-types, so it isn't all that great. Magnezone can also run a Choice Scarf set, but it is very weak without a boosting item and is still quite slow, so it is ineffective at both revenge killing and trapping Steel-types. Magnezone can run a Substitute set with Leftovers, as Substitute protects it from being revenge killed after trapping a Steel-type and can allow it to get an extra KO before needing to switch out. Assault Vest is a decent item on Magnezone, as it has good bulk and a ton of resistances. However, its common weaknesses and lackluster power without a boosting item prevent such a set from being too effective. Hidden Power Ice is an option that hits Pokemon such as Garchomp and Dragonite, but Magnezone has no business staying in on these Pokemon a majority of the time and the loss of Hidden Power Fire can severely hinder its ability to do its job against other Pokemon.
Checks & Counters
**Ground-types**: Ground-types, such as Garchomp, Excadrill, Landorus, Landorus-T, Hippowdon, and Mamoswine, are a major thorn in Magnezone's side because they are immune to Volt Switch and Thunderbolt. In addition, they greatly threaten Magnezone with a STAB 4x super effective Earthquake or Earth Power. However, many of these Pokemon take massive damage from one of Magnezone's other moves, so they can't always freely switch into it. Dugtrio deserves special mention as it traps Magnezone and can OHKO it with Earthquake.
**Fighting-types**: Fighting-types, particularly Terrakion, Conkeldurr, and Keldeo, can hit Magnezone hard with their super effective STAB moves. Despite this, they often take quite a bit of damage from Magnezone's moves and can easily lose momentum if they switch into a Volt Switch.
**Fire-types**: Fire-types, such as Talonflame, Heatran, Volcarona, Mega Charizard X, and Mega Charizard Y, are very similar to Fighting-types in that they can easily check it but don't take its moves particularly well.
**Earthquake**: Other common Earthquake users, such as Mega Pinsir, Mega Venusaur, or Dragonite, can easily deal with Magnezone, as Magnezone cannot take even non-STAB Ground-type moves.
**Special Walls**: Special walls such as Chansey do not mind Magnezone's moves in most cases and many of them can simply heal off its futile attempts to damage them.