Police launched an investigation after the incident during the match between Dunfermline Athletic FC and Falkirk FC at East End Park on Tuesday, January 2.
As a result, the pair aged 20 and 21 were charged under the Offensive Behaviour at Football and Threatening Communications (Scotland) Act and will now be reported to the Procurator Fiscal.
Officers continue to investigate this matter and anyone with information is asked to come forward.
Inspector Ian Flynn from Dunfermline Police Station said: “This incident was extremely offensive and such behaviour will not be tolerated.”
“While two people have now been charged, we are looking to trace others who may have been involved and would ask those with information to contact Dunfermline Police Station via 101 and quote incident number 3022 of January 4.”