I. Rooting your Kindle Fire
Why do you need rooting? Rooting allows you to get full control over your new tablet, allowing you to install rooted apps, install new ROMs, backup apps and a whole lots more.
A. Root on Window
1. Go to Settings -> More -> Device and make sure that "Allow Installation of Applications" is checked "On".
2. Connect your Kindle Fire to your computer via micro-USB cable. And hit "Disconect" to turn off the USB disk drive mode
3. Download KindleFireRoot.zip and unzip to the root directory of your hard disk such as: C:\KindleFrieRoot
4. Open command prompt window by press button "Window" + R and type "cmd" (not include "").
5. Browse to the KindleFireRoot directory by typing: cd\KindleFireRoot\files
6. Type: adb devices
7. You won't see anything so you have to install the drives. Open Device Manager under Control Panel -> Hardware and Sound
8. Double click on Kindle and Update driver. Choose "Browse my computer for driver software". Choose "Let me pick from a list of device drivers on my computer. Choose "Show All Devices". Choose "Have Disk". Find the file android_winusb.inf under KindleRootFire\usb_driver directory. Choose "Yes". Choose "Install this driver software anyway". You should now see "Android ADB interface". Next come back to Control Panel and choose "Appearance an Personalozation". Choose "Show hidden files and folders". Make sure "Show hidden files, folders, or drives" is checked on.
9. Nex go into the usb_dirver folder in KindleFireRoot folder and do right click->Copy on adb_usb.ini.
10. Browse to your User directoy, for me it's under C:\Users\max.
11. Browse to the .android directory and do right click->Paste.
12. Go back to command prompt and type:
adb kill-server
Then:
adb devices
You should get a bunch of numbers and letters, that’s the serial number of your Kindle Fire and you are ready to root.
Type:

cd ..
runme.bat

Your Kindle Fire should reboot and should be rooted.
You can verify you have SuperUser app by going to Settings->More->Applications->All Applications.
B. Root on Mac OSX or Linux
1. Go to Settings->More->Device and make sure “Allow Installation of Applications” is checked “ON”.
2. Connect your Kindle Fire to your computer via micro-USB cable. And hit “Disconnect” to turn off the USB disk drive mode.
3. Download KindleFireRootMacLinux.zip and unzip to the root directory of your hard disk such as c:\KindleFireRoot.
4. Open up a terminal.
5. Browse to the KindleFireRootMacLinux directory by typing:
cd Downloads/KindleFireRootLinux
6. Type:
mkdir ~.android
cp adb_usb.ini ~.android/.
*Note – You might have to add “sudo” for Ubuntu
7. Type:


For Mac:

./adb-mac kill-server
./adb-mac devices


For Linux:

./adb-linux kill-server
./adb-linux devices


If you get a bunch of numbers and letters, that means you are good to go.
8. Type:
For Mac:
sh runmemac.sh
For Linux:
sh runmelinux.sh
9. Your Kindle Fire should do its rooting and reboot.
You can verify you have SuperUser app by going to Settings->More->Applications->All Applications.
Finish rooting :D
II. UnRoot Kindle Fire
1. Download adb.zip and unzip, you should get a folder called adb.
2. Open up a command prompt or terminal and type:
For Windows:
cd \adb
For Mac or Linux:
cd /adb
3. Type the following to get into ADB shell:
For Windows:
adb shell
For Mac:
./adb-mac shell
For Linux:
./adb-linux shell
4. Copy and paste the following to enable read/write on filesystem:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
5. Type the following to remove rooting files:
rm /system/app/Superuser.apk
rm /system/bin/su
rm /system/xbin/su
6. Type the following to reboot and your Kindle Fire should be fully unrooted!
reboot Kindle Fire
Source:  rootkindlefire.com
loading...