It is not known when Lin Yanyu was born, and other than the fact that he was from Minqing (閩清, in modern
Fuzhou,
Fujian), nothing was recorded about his family background or how he became an
eunuch. It was said that he had a treacherous personality and was a deep thinker. At some point, Lin became a eunuch attendant to
Wang Yanjun, who would have then been an officer under his father
Wang Shenzhi, the founding Prince of
Min. Min thus established a liaison office at the Southern Han capital Xingwang (興王, in modern
Guangzhou,
Guangdong). Lin was sent to Xingwang to head the office, and was in charge of the communications between the two states. Liu Yan gave Lin a large mansion and much gifts. He often tried to ask Lin about the Min state. Lin refused to respond, but told others, "How would it be proper, for someone who is deep in the palace, to be talking of Min once he left Min and talking of Yue [(i.e., Southern Han, whose territory was also known as the Yue region)] once he left Yue?" When Liu Yan heard of this, he became more respectful of Lin. He gave Lin the title of
Neichangshi () and put Lin in charge of his own palace. == Service at Southern Han court ==