The Goblins questline beginning with this quest is mutually exclusive to the Ratmen questline beginning with Uniting the Clans.
Obtaining the quest
To obtain the quest, find an encounter of a Goblin and Ratman fighting with each other. When you find this encounter, you are given the option of siding with either the Ratman or the Goblin. Side with the Goblin. Then, adventure in the Goblin Head tunnel until you find a goblin fortress allowing you to report for duty.
Summary and walkthrough
After siding with the goblins and reporting for duty, you are directed to find and kill a rival goblin tribe. Finding the tribe the leader will attempt to barter for his life with 500 gold. Not accepting this he will raise it to 1000 gold. Killing him will allow you to continue to A Matter of Luck(Goblin). Accepting his bribe will result in re-opening of the quest by the Goblin Overlord (but, at least, you will get additional 1000 coins, and a chance to get an unique follower that cannot be found any other way!); in this case you'll find the escaper in the Ratman Kingdom.
Alternative method for clearing the path to Mayhew
Instead of completing this line of quests (or the Ratman counterpart quests), it is possible to directly gain access to the Mayhew sewers by destroying the Goblin Fort when you first arrive at the area. If you have not sided with the Goblins or Ratmen, when you first come across the Goblin Fort, you are given the option of attacking it. The fort is extremely heavily defended (example defense (at level 28): 20 Goblin Champions, 16 Goblin Overlords, 10 Goblin Archers, 15 Goblin Priests, 5 Goblin Guardtowers and 9 Goblin Deathtowers). Winning this battle is highly unlikely for a hero that has yet ventured outside of Valmorgen.
If you choose the attack the fort and win the battle, your path to Mayhew will be opened without having to complete the Ratman or Goblin quests. The game will inform you that "Against all odds, you have defeated the Goblin Horde and are able to pass to the Mayhew Sewers.". Additionally, the Ratmen will refrain from attack you, as if you had sided with the Ratmen. However, you only have one chance to defeat the Goblin Fort using this method. If you lose the battle, you are not given another opportunity to directly attack the fort, and must therefore go through this questline (or the Ratmen questline) in order to gain access to Mayhew through the sewers.