Sustainable conversion of biomass waste into highvalue functional materials holds practical significance for the ecofriendly development of resources. Here, we described a sustainable and compatible molten salt leaching-electrodeposition method for transforming rice husk (RH) biomass to functional silicon nanowires (Si NWs) and porous carbon. The silica in the carbonized RHs was skillfully converted into soluble silicate ions (SiO 4 4− , etc.) in the easily recoverable and recyclable CaCl 2 -CaO salt, and the Si NWs can be directly extracted by controllable electrodeposition in the obtained leachate salt. Simultaneously, molten salt leaching leads to the formation of functionally porous carbon. The involved reaction mechanism of leaching-electrodeposition has been systematically studied by in situ XRD, electrochemical techniques, and density functional theory calculations. The results show that the continuous production of Si NWs and porous carbon can be achieved through periodic leaching and electrodeposition. As a proof of concept, the resultant Si NWs exhibit excellent cycling performance as high-capacity anode materials for lithium-ion batteries, delivering a reversible specific capacity of 2410 mAh g −1 at 0.1 A g −1 . Particularly, the RH-derived porous carbon materials can also be directly used for organic adsorption applications with 99.1% adsorptive removal of methylene blue (50 mg) per gram of porous carbon. This novel molten salt leaching-electrodeposition strategy has great potential for the functionalized utilization of RH biomass and may also have implication for the upgraded utilization of other silica/carbon-rich biomass and coal ash.