A conductance-controllable hybrid device that utilizes the photoinduced charge transfer behavior of a porphyrin in a field-effect transistor (FET) with a nanogap is proposed and analyzed. A conventional metal-oxide-semiconductor (MOS) structure is modified to form a nanogap In which the porphyrin can be embedded. The conductance of an inversion channel is controlled by the negatively charged, optically activated porphyrin molecules. The proposed nanogap-formed MOSFET structure solves the conventional dilemma that a top-gate cannot be used for an organic-inorganic hybrid device because the top-gate blocks an entire area of a channel where organic material should be immobilized. The top-gate structure has much practicality compared with the back-gate structure because each device can be controlled individually. Furthermore, the device is highly compatible with the chip-based integrated system because the fabrication process follows the standard complementary metal-oxide-semiconductor (CMOS) technology. The charge transfer mechanisms between silicon and porphyrin are analyzed using devices with different doping polarities and geometrical parameters. The results show that the influence of the negative charge of the porphyrin in the device Is reversed when opposite doping polarities are used. The device characteristics can be comprehensively evaluated using the energy band diagram analysis and simulation. The possible application of the proposed device for nonvolatile memory is demonstrated using the optical charging and electrical discharging behavior of the porphyrins.