The Raid on Lannisport was one of the opening attacks of the Greyjoy Rebellion, taking place approximately nine years before the beginning of the Game of Thrones series. The Lannister fleet, docked at Lannisport was destroyed in an attack carried out by Euron Greyjoy, brothers of Balon Greyjoy, who had crowned himself King of the Iron Islands.
In the books
In the A Song of Ice and Fire novels, the attack on Lannisport was devised by Euron Greyjoy but carried out by Victarion, Lord Captain of the Iron Fleet. The destruction of the Lannister fleet gave the Ironborn freedom to launch an attack against Seagard and raid the coastline.