Basil grows best outdoors where it can receive adequate light and temperatures, but you can also grow basil indoors as long as it's set in a sunny location. Whether you plant basil indoors as a natural fly deterrent — flies can't stand the scent of basil — or grow the plant for use in your recipes, don't give up on a dying basil plant; try caring for the plant as normal to revive it.
Repot the plant to ensure that it is in well-draining soil. Replace the plant in a well-draining potting mix. Choose a pot with drainage holes to ensure that the water doesn't accumulate and expose the roots to too much water.
Sterilize scissor blades with isopropyl alcohol and remove dead or damaged leaves from the plant. Eliminating dead parts encourages energy to go to the undamaged parts of the plant.
Water the soil around the plant until the top 1 inch of soil is wet, but not saturated. Don't let the leaves themselves get wet. Pour off excess water from the soil surface as necessary. Allow the soil to dry out before watering it again, but keep it near other plants to increase humidity, or mist the plant with water between waterings.
Set the plant in a south-facing window that receives six to eight hours of direct sunlight each day. Turn the plant every day to ensure that all parts of the plant receive adequate direct sunlight.
Apply high nitrogen fertilizer — diluted to half strength — every four to six weeks to the potting soil.