It can only be caught by using a cheating device. After fainting in a battle, a message will pop up saying that the Marowak's soul has finally moved on to the afterlife. This message, however, still shows up even if the player actually caught the Marowak with a Gameshark or Action Replay given that the Marowak is not supposed to be catch-able.
Ghost has a flag that prevents him from being capturable. Playing around with the hex will disable this block allowing you to capture him, as Ghost was coded as a pokemon, not a NPC. Also Ghost has no behind view sprite, only a forward view sprite. Since he has no behind view, capturing him would just show a corrupted image like MissingNo. Along with numerous other unforeseen errors since he was never meant to be captured in the first place.
Anybody knows the code, how to use it and if its save to the game file? I've searched everywhere but found nothing, except this:
He said he did a memory viewer glitch on the Visual Boy Advance emulator to catch it but no explanation was given.
I also found that some guys were trying to use the marowak routine to make some other pokemon uncachable for some reason in pokemon fire red:
I just confirmed that the stats of the Marowak (Ghost) are randomly generated by using the Mew glitch on it. First try gave me Kadabra, then Pidgey then Chansey. But if whats on Bulbapedia is correct it should only have 3 of the 4 start attacks of a normal Marowak in R&B.
Thanks for the advise, but by using a ditto i just found out that the Marowak (ghost) has normal start moveset of 4 attacks not 3 in the English version of Pokemon Red. (when ditto uses transforms he copies any attack the other Pokemon has even illegal ones.) So i guess that means the info in Bulbapedia about it is either wrong or is refering to the japanese versions only. I will try your method in a while just in case, i have never used the memory viewer before.