Association rules mining is an effective method to extract hidden knowledge in databases that is used widely in intrusion detection. But it causes the sharp boundary problem in handling databases with quantitative attributes. To solve the problem, a method is presented that integrates fuzzy sets and genetic algorithm in anomaly detection. Encoding the parameters of membership functions into an individual (chromosome) and embedding the fuzzy association rules mining techniques into the genetic optimization, an optimal parameter-set can be obtained. With the use of the parameter-set in anomaly detection, the normal states of protected system can be differentiated from the anomalous states to the largest extent, and the veracity of anomaly detection is improved significantly.