A method of synthesizing a compound of imaging agent with HDAC (histone deacetylase) inhibitor consists of two parts, the first part of the method is to provide the inhibitor of HDAC with a compound of imaging agent that includes HDAC inhibitor BNL-26 (C22H23N3O) and its analogs to be labeled with radionuclide F-18, producing a series of new nuclear medicine tracers: BNL-26-CH2CH218F, BNL-26a-CH2CH218FF, BNL-26b-CH2CH218F, BNL-26c-CH2CH218F and BNL-26d-CH2CH218F. These nuclear medicine with imaging agents can be used as a tracer in vivo binding to over-expression HDAC and produce a HDAC nuclear medicine imaging effect to serve for clinical diagnosis. The second part of the method is to provide a slightly adjusted a structural framework of BNL-26 and use pyridine to substitute the benzene ring of the BNL-26 structure, and then synthesize with other substituent to produce a series of additional 30 more HDAC inhibitors, named from Iner-1 to Iner-30 compounds.