Serious games have a wide range of applications. Modeling virtual character behaviors and emotions is a challenging task in developing serious games. To generate real-time responses, behavioral and emotional models must be simple and effective. Existing studies have paid little attention to the semantic understanding of virtual characters to external stimuli and have not effectively linked perceived semantics and motivation. This paper proposes a cognitive structure for the virtual character. The structure contains multiple modules: perception, personality, motivation, behavior, and emotion. Based on psychological theory, a semantic table that connects external stimuli, motivations, behaviors, and emotions is designed for each virtual character. Perceptivity is introduced to measure the degree of perception. According to Maslow’s motivation theory, a quantitative description of motivation is given and a discriminating method is proposed to generate behaviors and emotions. A prototype of a serious game is developed to verify the validity of the proposed method. The experimental results show that the proposed method can simulate the behavior and emotion of virtual characters in real time and will enhance the immersion of serious games.