The military history of Ukraine begins with the Zaporozhian Cossacks. At first, they lived wild & free until the Polish-Lithuanian commonwealth expanded its reign to the lands we know today as Ukraine, absorbing them to their army as "Registered Cossacks" formations, as the Poles need them to guard their borders from the Turks.
Then, one of the Registered Cossacks commander Bohdan Khmelnytsky led a successful uprising against the Poles, creating an independent Ukrainian Cossack state "Zaporozhian Host", then becoming an autonomous vassal of the Tsardom of Muscovy under the Treaty of Pereyaslav before the Zaporozhian Host liquidated under the order of Catherine the Great, absorbing them to the Russian Imperial Army.
In both World Wars & the Russian Civil War, there are Ukrainian armed groups who found opportunity to escape prolonged Russian rule as well as those who served under armies of Russia, in World War I there were Austrian-formed Ukrainian Sich Riflemen, recruiting local Ukrainians to revenge against the Russian Empire, who then formed the backbone of the short-lived Ukrainian People's Republic in Russian Civil War before being crushed by both Red & White army of Russia. Also there are Nestor Makhno's Ukrainian anarchist forces with their Tachanka(horse-drawn cart with machine gun), initially they fought alongside the Red Army but later against them after the White presence is over & the Bolsheviks considered them as a new threat.
Later in World War II, the Ukrainian Insurgent Army was formed to liberate Ukraine from Soviet rule, sometimes allegedly collaborating with the Nazis which remains controversial to this day. They fought against the Soviets until the early fifties, with intensity comparable to the Soviet-Afghan War.
Following the breakup of the Soviet Union, the newly-independent republic of Ukraine took control of most former Soviet military assets on its territory. The major exceptions were nuclear weapons, the majority of the Black Sea Fleet and the naval base at Sevastopol. The former nationalistic government of Poroshenko claims that the Ukrainian military are descended from the aforementioned independence fighters rather than Soviet Army, sometimes parading Ukrainian Insurgent Army veterans accompanied by militant youth in western part of the country like Lviv.
As of 2014, may be turning into a Badass Army candidate with the whole War in Donbass thing, fighting well equipped Russian-backed insurgents supported by Russian soldiers. Bonus points for doing it while being chronically under-equipped, which contributed to the September 'ceasefire'.
Under the auspices of the Treaty Conventional Armed Forces in Europe, Ukraine was entitled to an upper limit of 450 000 men under arms; in practice, this turned out to be too much for the young nation, thus cost-cutting measures. In fact, the ZSU (not the Soviet SPAAG, but the Zbroyni Sily Ukrainy, literally Armed Forces of Ukraine) were systematically cut in size, funding and materiel literally every single year since at least 1998 - first as a cost-saving measure, then under the auspices of reforming to NATO standards, then... something else. By 2013, the Armed Forces shrunk down to 150 000 men strength. On paper. Then Crimea happened.
The Armed Forces are further divided into Army, Navy and Air Force, with the Navy being notorious for having more admirals than ships (and, as of Spring 2014, not having any ships) and the Air Force being likewise notorious for not being in the Air all that much; the average Ukrainian fighter pilot has only about 10-20 flying hours, and the fighters themselves were often short on fuel. Currently experiences a shortage of planes due to a number (mostly Su-25 Frogfoots) getting shot down in Donbass.
The Army, on the other hand, is the service branch most heavily engaged in the fighting proper, as well as possessing the most firepower (more on that firepower below). Among its relative successes is the near-legendary siege of the Donetsk Airport (which lasted for 242 days before both airport terminals collapsed, leaving it indefensible and forcing the garrison to pull out; place is now one big killing ground); for their incredible resilience and spirit, the airport's defenders are widely referred to as 'Cyborgs' by Ukrainian media, public and government both.
Army units, especially the Airmobile Forces (airborne component that ends up not being very airborne), Armored Forces and the artillery, generally do most of the heavy lifting in the war; the Navy occasionally chips in with the Marine Corps, a brigade-sized detachment of Ukrainian naval infantrymen, and the Air Force used to harass the separatist forces from the air before running out of planes. This contributed to the insurgents "acquiring" Russian-made SAM systems and the ill-fated shootdown of the Malaysian Airlines Flight MH 17 in mid-July. The other participants in the war are the National Guard and the volunteer batallions, elaborated on below. In addition to the war in Donbass, the Army is also busy with securing Ukraine's (rather shoddy) borders with Russia, occupied Crimea and Transnistria.
Despite the country sitting on a treasure trove of Soviet military hardware, most of that hardware turned out to be rusty and generally out of working order in the next 23 years, with the most functional examples being sold abroad. The Ukrainian defence industry therefore struggles with getting that hardware into working order and trying to get the defence industry itself to produce all the cool stuff designed during independence. The T-84 Oplot, for example, may be a Cool Tank, but most of them being produced now are intended for Thailand, while the Army has to do with 30-something T-64s (also a one-time Cool Tank) and their modifications. Ukraine also has the only shipyard in the former Soviet Union capable of building aircraft carriers, but didn't (and probably won't) do anything particularly productive with it; an indigenous Ukrainian corvette, the Volodymyr Velikyi, is stuck at about 75% complete, and the newest ship in the Navy was commissioned in 1998. Similarly, Ukraine inherited the world-famous Antonov Design Bureau and its An-225 Mriya record-setting cargo aircraft, but most of Antonov's newest planes were intended for Russia, and another Mriya simply can't be built. A modern SRBM project by Yuzhnoe Design Bureau (they of the SS-36 Satan fame) was quietly buried during the Yanukovych presidency. Licensed production of the Israeli TAR-21 and Galil ACE was negotiated all the way back in 2008, but it barely started last year, and both rifles are in the middle of their state acceptance trials (Ukrainian troops instead have to do with trusty old AK-74s, fitted with rails and red dot sights). While the defence industry is busy getting into high gear, it is mostly stuck with refitting older hardware, and the future of some of its industries is uncertain to say the least.
Along with the Armed Forces (under the Ministry of Defence aka MO), Ukraine also has the National Guard gendarmerie/military force of the Ministry of Internal Affairs (aka MVS, short for Ministerstvo Vnutrishnykh Sprav). For added confusion, there was a National Guard from 1992 until 2000, when it was reorganized into Internal Troops (conscripted riot police as in Russia). Said Internal Troops then got rebranded back into National Guard in March 2014, together with an influx of new blood, such as resistance fighters from the Euromaidan movement. With the war going on, the National Guard also had to learn the ropes on the fly, but has acquired a reputation for getting new stuff (or, well, any stuff) way ahead of the military proper, starting with BTR-4 APCs (originally intended for Iraq) and lately with new MRAPs, APCs, artillery, assault rifles (a Ukrainian licensed copy of the Israeli TAR-21) and new Cadian Shock Troops-esque uniforms. The latter could be intentional, since the current Minister of Internal Affairs is a science fiction fan.
The MVS also often sends police officers into the area of confilct, primarily traffic policemen (known in Ukraine as DAI, or Derzhavtoinspektsiya, literally State Traffic Inspection) and riot police troopers from the infamous disbanded Berkut unit. These primarily man checkpoints in the wider Donbass area, and not the frontlines proper. Donetsk Oblast police have recently also demonstrated professionalism above and beyond the call of duty in towns close to the front line, especially in the beleaguered town of Debaltsevo.
As of April 2014, the Border Guard and the State Emergency Service were also absorbed into the MVS structure. The Border Guard now has its hands full maintaining the Ukrainian border, especially with Russia and Transnistria, and its maritime component, the Sea Guard, ended up having more ships than the Navy proper, after Crimea happened.
Lastly, there are the volunteer battalions, hastily organized in April 2014 to combat the Russian-backed insurrection, seeing as the army and police forces were largely demoralized and less than effective then. In time, these battalions grew into considerable fighting forces, even if of dubious effectiveness and even less discipline; while ostensibly created to combat insurgency, many are engaged in front-line combat against the pro-Russian paramilitaries, leading to several and disasters. The battalions, however, enjoy better publicity than the army and even the National Guard, sometimes being hailed as 'heroes' and 'patriots' by the more patriotic Ukrainians. Battalions nominally fall under the command of either the MVS (in which case they are typically called 'militsiya special battalions') or the MO (in which case they are called 'territorial defence battalions'), although the chain of command is... less than clear; battalion commanders have been known to act on their own initiative and disobey orders, leading to at least one major case of desertion, as well at the aforementioned debacle in late August.
Most battalions have proper names and are typically associated with Ukraine's different regions and oblasts; some of the better-known examples are the Donbass Battalion (one of the first ones to be formed) and Azov Battalion (notorious for being heavily associated with various Ukrainian far right organizations - as is, being comprised of the members of said organizations), named for the Donbass (Donets Basin) area and the Azov Sea respectively, or the Aidar Territorial Defence Battalion, so named for the Aidar River in the northern Luhansk oblast'. Less descriptive names, such as 'Dnepr-1' or 'Kyiv-1', are also used; while 'Dnepr-1' was the first battalion created and has seen a fair share of fighting, 'Kyiv-1' is mostly used for law enforcement duties, particularly in the now-liberated Slavyansk.
Ukraine also has a number of special forces units, either under the GUR (military intelligence), the SBU (internal security service), or the UDO (people in charge of the President's security). All of them had seen action in the war, particularly its opening phases. Army special forces, particularly the Kirovohrad 3rd Spetsnaz Regiment, were instrumental in many wartime successes, most importantly the siege of Donetsk Airport (which 3rd Spetsnaz retook in a lightning strike back on May 26th, 2014), and now perform direct action and sabotage missions behind separatist lines. Navy special forces and combat divers are also involved in the war, especially in the southern port of Mariupol.
Ukrainian forces also participate in UN peacekeeping missions over the world, in Kosovo, Bosnia, Kongo, Mali and Sierra-Leone. Ukrainian troops and military advisors also participated in the Iraq War between 2005-2006.
At present, the Ukrainian military is perhaps the only example of a crowdfunded military: due to being largely neglected for the past 23 years, the Armed Forces were suffering from a chronic lack of equipment, fuel, spare parts, medical supplies and even basic amenities. Inspired by the recent example of the Euromaidan revolution, Ukrainians from all over the country pitched in. Volunteers organized help, paying for supplies and logistics from their own money and donations to outfit the non-combat-ready units. Back in 2014, a drafted Ukrainian basically had to bring his own BD Us, helmet and body armor, as the Ministry of Defence (in charge of military supply and logistics) couldn't provide him with any. Volunteers supplied the army with firearm sights, thermal optics, radios and even unmanned recon drones. Volunteer efforts even restored a non-flightworthy An-26 aircraft to working condition in under five months. After grudgingly accepting civilian help, the Ministry of Defence finally relented and joined efforts with some more prominent volunteers, embarking on a campaign of structural and logistics reform which only starts to bear fruits. The volunteer movement is often cited as the only thing that saved Ukraine from inevitable doom, and turned Ukraine's army from an underfunded sham into a Badass Army which managed to hold back an enemy supplied by Russia's endless supply of military hardware.
As a result it is one of the biggest military forces outside of NATO, should membership be granted it would be its largest national armed forces contribution, with more than 10,000 women now in service thanks to a Ministry of Defense decision in June of 2016 including women in the military, for a total of an estimated 400,000 active and 790,000 reserve personnel.
The Ground Forces (Sukhoputni Viyska)Biggest of the services with 300,000 active service personnel. Organized into 4 Operational Theater Commands and the 4th reserve corps.
The NavyActually de jure the youngest, born out of the 1997 division of the ex-Soviet Black Sea Fleet, but de facto active since its 1992 creation. But also the smallest.
the Air ForceThe 36,300 personnel and 144 aircraft Air Force, based in Vinnytsia and one of the world's biggest air forces, is on an modernization plan following the Donbass conflict. Also has an active air defense command.
The Ukrainian military doesn't appear in fiction nearly as often as their Russian counterparts, but they can be expected to appear far more often than any other former-Soviet military (at least in works produced outside the former USSR). There are several reasons for this, first and foremost among them the simple fact that Ukraine has the second-largest population of the former-Soviet nations (after Russia) and the third-largest landmass (after Russia and Kazakhstan). Another factor is that Ukraine is one of the few nations of the former USSR other than Russia to maintain its own navy after the breakup of the Soviet Union, making them the obvious choice for naval-themed works requiring a former Soviet republic that isn't Russia for whatever reason.
- One of the protagonists in David Weber's near-future military science fiction alien invasion novel Out of the Dark is a Ukrainian soldier.
- Ukrainian forces appear in the S.T.A.L.K.E.R. series (the protagonist in S.T.A.L.K.E.R. Call Of Pripyat is an officer in the Ukrainian SBU, which is a law enforcement/intelligence agency, not part of the military).
- Appear as a playable side in Point of Existence 2, a total conversion mod for Battlefield2, which pits the ZSU against the Bundeswehr, of all people. How competent they are depends on the players, and the Ukrainians also spot some domestic equipment, such as T-84 Oplot Cool Tanks or the obscure Vepr bullpup derivative of the AK-74.
- Chernobyl Diaries: They quarantine the ruins of Chernobyl for the past 30 years or so and make sure anyone trespassing is properly disposed of, thus making their role as Armies Are Evil.
- Crysis 2 features the Grendel 6.8mm battle rifle, apparently Ukrainian-made. How and why it turned up in New York instead of any similar American-made battle rifle is uncertain at best.
- Command & Conquer: Red Alert allows the player to choose Ukraine as a faction in multiplayer mode. Obviously, the choice of buildings and units is the same as for the Soviet faction.
- In Lord of War, Villain Protagonist Arms Dealer Yuri is a Ukrainian-American whose parents fled the Soviet Union and settled in America. After the collapse of the USSR he returns to Ukraine and buys military hardware from the effectively unemployed Ukrainian Red Army troops.
- World War Z: The Ukrainian military tried to instill quarantine measures to evacuate its citizens to safe-zones but once the task proves too much to deal, they end up gassing civilians with Cold War chemical weapons to make sure who is infected with the zombie virus (which reanimates) to those who are clean (which do not reanimate). While described as an extremely controversial measure, it succeeds in defending the safe-zones in Ukraine including Crimea. Post-war, the Ukrainian military may face confrontation with the forces of the Holy Russian Empire for encroaching their territory.