The Rebel Flagship is the final boss of the game. It is encountered in sector eight, also known as The Last Stand. It has three unique phases and weapons not seen anywhere else in the game. It will periodically jump from beacon to beacon. The objective is to destroy the Flagship before it reaches the Federation base. If the Federation base is reached, the game will end.
Note that if all of the crew on the Flagship are killed an AI will take over and repair all systems, so this is not advised.
 Phase I
The first phase of the Rebel Flagship is a relatively standard fight. It does not have a single weapons system, but rather four individual weapon rooms which are not connected to the rest of the ship. The Flagship has four shield layers, which can be difficult to bypass. It has a high dodge chance, making it even more difficult to get through its shields. To make it even better, the Flagship possesses cloaking. When it cloaks, there is a good chance its shields will recharge.
The Flagship has four weapons: a triple ion cannon, a triple heavy laser, a triple missile launcher, and a large beam weapon. The missile launcher is regarded by many to be the most dangerous. Due to the weapons' separation from the main ship, a teleporter is highly advised to teleport into and destroy the rooms, because the only crew inside cannot reach the med-bay and nobody can get inside to repair it when it is destroyed.
After you defeat the first phase, part of the Flagship will break off and it will jump away. You can either visit one of the repair beacons (assuming there are any close by) or follow the Flagship directly to its next destination.
 Phase II
Phase Two of the Flagship is considered mainly to be the hardest part. Upon jumping, you will notice two things: the Flagship is missing its triple ion cannon and it has redirected power to its drones. It has also lost cloaking. An Anti-Ship Drone and Beam Drone will engage your ship. The heavy laser and missile launcher will continue firing; all of the subsystems will repair themselves. However, the crew will not carry over, meaning that if you eliminated all but one crew member, there will only be one crew member left.
Periodically, you will receive a warning. Shortly after, a swarm of Anti-Ship and Beam drones will flock to your ship and attack it mercilessly. This can do a lot of damage to someone without high dodge change, as they punch through shields. Cloaking is very useful for the swarm of drones, as they will not be able to pinpoint your position.
Once you reduce the hull's health to zero, the Flagship's right wing will break off and it will jump away again.
 Phase III
This is the final phase and typically the easiest if you have good weapons. You will notice that the Flagship now has a powerful shield surrounding it. This will take about ten damage and regenerate when the ship has not taken damage. Once you get through, you can attack the ship as normal.
The Flagship has lost its beam weapon, leaving only the heavy laser and missile launcher. The crew remaining on the ship will continually teleport onto yours constantly, so taking out their teleporter should be a priority. Note that if there are crew members in the heavy laser or triple missile they will not be able to reach the teleporter.
Periodically, you will receive a warning message. The Flagship will soon fire out a very large burst of heavy lasers capable of doing massive damage. Cloak can be used to avoid most of the damage if evasion is not sufficient.
Note that jumping away while the flagship is exploding, before the victory screen appears, will cause the game to continue and the flagship will regenerate all shields and systems but not the crew.
Once you destroy the Flagship on this phase, it will explode. Congratulations, you have defeated the most powerful enemy in the game!
Weapon Focused: If your ship is heavily invested into weaponry, you will rely on ion and missiles to destroy it. Lasers and beams alone will be very hard. One technique is to perform an "ion lockdown", where two ion bursts are firing continuously at the weapons/shields of a ship. However, this will only apply to one of the Flagship's weapons. Missiles can be used to destroy the helm, which will prevent dodging.
Phase I will be played out like any other battle. Ion weapons are good on the shield, and missiles are good for penetrating shields if needed. Lasers and beams are very effective at destroying subsystems on the ship if the shields are sufficiently harmed. On the Crystal Ship, the shield-penetrating weapons may come to good use here.
Phase II is a tad more complicated. The first thing you will want to do is take out the shields, and then the drone control. However, destroying the drone control will not stop the swarm of drones that attack periodically. It may be useful to destroy or lock down the missile launcher in this phase.
When you initiate Phase III, throw all you have at that shield until it goes down. A Beam Drone will work wonders here, as it fires frequently, taking off 2 HP from the shield every time, and more importantly, doesn't miss. Same goes; disable the shield and attack. There is no special ability besides its regenerative super-shield. The ship will eventually explode. Congratulations, you have conquered the Flagship!
Boarding Focused: If your ship is invested primarily into boarding and taking over enemy ships, you should have Mantis, Rock, or Crystal in your boarding team; else the fight will be very hard to complete via boarding.
Phase I will be much easier if your ship has invested in a teleporter. To start off, teleport your boarding party into the triple missile launcher. Kill the crew member and destroy the system. Due to the missile being disabled, your ship will take much less damage. Next, target the medbay, damaging shields first if need be; the level 3 medbay will make killing crew impossible otherwise. Proceed to teleport your crew into the enemy ship and slowly kill off the crew one by one. It is recommended to leave the crewman operating the heavy laser alone, but kill the rest. Now, for the rest of the battle, there will be no crew to bother you. Once all crew have been dealt with, damage all of the subsystems (except the heavy laser and oxygen) and teleport out. There should only be a small amount of hull health left which should be more than enough for your weapons.
Phase II is simple. Teleport your crew to the missile launcher and destroy it, then rinse and repeat for the Drone Control. Repeat the procedure as last time, and you should be okay.
Phase III is hard for boarding focused ships. You will need to disable the shield surrounding it before you can teleport your crew in. Teleport your boarding party into the missile launcher, and destroy it. Proceed to do it with all of the other subsystems - damage oxygen this time. Recall to your ship and use your firepower on the heavy laser; the last crew member will die a painful death of asphyxiation and lasers. The ship will explode. Congratulations, you have conquered the Flagship!
Extra images will be greatly appreciated.