Import custom database into wp and keep the post id

The simplest way would be to export your old site’s posts from phpmyadmin, manually edit the .sql file that you download and then upload the new file to your site’s database from phpmyadmin again!