Most cases of gastric cancer (GC) are not diagnosed at early stage which can be curable, so it is necessary to identify effective biomarkers for its diagnosis and pre-warning. We have used methylated DNA immunoprecipitation (MeDIP) to identify genes that are frequently methylated in gastric cancer cell lines. Promoter regions hypermethylation of candidate genes were tested by methylation-specific polymerase chain reaction (MSP) in serum samples, including GC (n = 58), gastric precancerous lesions (GPL, n = 46), and normal controls (NC, n = 30). Eighty two hypermethylated genes were acquired by array analysis and 5 genes (BCAS4, CHRM2, FAM5C, PRAC and MYLK) were selected as the candidate genes. Three genes (CHRM2, FAM5C and MYLK) were further confirmed to show methylation rates increased with progression from NC to GPL, then to GC. There was obvious decrease in detection of FAM5C and MYLK hypermethylation, but not CHRM2, from preoperative to postoperative evaluation (P < 0.001). Combined detection of FAM5C and MYLK hypermethylation had a higher sensitivity in GC diagnosis (77.6%,45/58) and pre-warning (30.4%,14/46) than one single gene detection and also had a high specificity of 90%. The combined hypermethylated status of FAM5C and MYLK correlated with tumor size (P < 0.001), tumor invasion depth (P = 0.001) and tumor-node-metastasis (TNM) stage (P = 0.003). Hypermethylated FAM5C and MYLK can be used as potential biomarkers for diagnosis and pre-warning of GC.