In expressions like this "последний" means "the worst kind of". It can be used with different derogative words, not only "pig".
Он поступил как последний подонок - He acted like the worst kind of...