Attitudes concerning national identity (e.g., nationalism, patriotism) are known to correlate with various social behaviorssuch as party preferences in voting. For instance, survey data indicates that Japanese citizens who are proud of beingJapanese (i.e., patriots) and those who are high in a right-wing tendency are more willing to vote for the conservative party(Liberal Democratic Party). In this study, we employed an agent-based modeling approach to understand how nationalidentity affects individual voting intentions. The individual agents and the political party agents interacted with each otherby spreading their political attitudes (e.g., VAT should be increased to maintain the pension insurance system), and therecipients of the messages changed their attitudes (e.g., persuasion). The simulation revealed that the effects of persuasivemessages were moderated by the strength of its own national identity attitudes, and the resultant individual agents votingpreferences simulated the human participants data more precisely.