The expression means to make money in an illegal manner.
Example: Politicians taking money is not considered news in India. We expect them to. The problem is many of our politicians are more interested in lining their pockets than in serving the people.* I just read somewhere that some of the top executives in a well known company were more interested in lining their pockets than in looking after the welfare of their employe