A CdS/ZnO sesame-seed-candy structure is grown on silicon nanoporous pillar array. CdS/ZnO/Si-NPA is highly sensitive to humidity. The hysteresis of CdS/ZnO/Si-NPA is small and the response time is short. The performance is due to the unique hierarchical structure of CdS/ZnO/Si-NPA.