If you want a specific answer on how to do what you are asking, you need to provide more information about the tools you are using. What database system? what programming language?
However I think you have a bigger problem than how to insert a null. Even though it is a FK, it is still a key. For referential integrity there should be a PK that matched in another table. This means that there would be have to be a PK with a null somewhere too, which is something you should never do in a good database design. If at all possible look into a better design for the database tables that doesn't require you to use null keys.